Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5067

make PDVisibleSignDesigner memory aware

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.23
    • None
    • Signing
    • None
    • Patch

    Description

      PDFBOX-2512 might have failed earlier if I hadn't used

        MemoryUsageSetting.setupMixed(15000000)

      to limit the memory usage of PDDocument document to 15 MB in CreateVisibleSignature in

       

      a) setVisibleSignDesigner() and used the now memory-aware constructor of PDVisibleSignDesigner

          and

      b) in signPDF(), reused PDDocument

         setTsaUrl(tsaUrl);
         PDDocument doc = null;
         if (null != visibleSignDesigner)

      {        doc = visibleSignDesigner.getDocument();    }

         if (null == doc)

      {       doc = Loader.loadPDF(inputFile, memoryUsageSetting);    }

         // creating output document and prepare the IO streams.
         ...

       

      Attachments

        1. patch_PDFBOX-2512.txt
          3 kB
          Ralf Hauser
        2. patch_PDFBOX-5067_CreateVisibleSignature.a.txt
          3 kB
          Ralf Hauser
        3. patch_PDFBOX-5067_CreateVisibleSignature.b.txt
          2 kB
          Ralf Hauser
        4. patch_PDFBOX-5067.txt
          2 kB
          Ralf Hauser
        5. patch5067_CreateVisibleSignature.txt
          2 kB
          Ralf Hauser

        Activity

          People

            Unassigned Unassigned
            hauser@acm.org Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: