[jira] [Created] (PDFBOX-4154) Signature appearance on all pages pdfbox
prajwal created PDFBOX-4154: --- Summary: Signature appearance on all pages pdfbox Key: PDFBOX-4154 URL: https://issues.apache.org/jira/browse/PDFBOX-4154 Project: PDFBox Issue Type: Improvement Components: AcroForm Affects Versions: 2.0.8 Environment: windows Reporter: prajwal Hi is there any means to create signature appearances on all pages for a single digital signature using pdfbox. I have tried with *itext* and working fine but *pdfbox* is not allowing to do so.. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-2941) Improve PDFDebugger (2)
[ https://issues.apache.org/jira/browse/PDFBOX-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402203#comment-16402203 ] ASF subversion and git services commented on PDFBOX-2941: - Commit 1827024 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1827024 ] PDFBOX-2941: trigger premature initializations for more accurate rendering benchmarks > Improve PDFDebugger (2) > --- > > Key: PDFBOX-2941 > URL: https://issues.apache.org/jira/browse/PDFBOX-2941 > Project: PDFBox > Issue Type: Improvement > Components: Utilities >Affects Versions: 2.0.0 >Reporter: Tilman Hausherr >Priority: Major > Attachments: gs-bugzilla694570.pdf, keep_zoom.diff, osx-tabs.png, > pdfdebugger-screenshot-reverted.png, pdfdebugger-screenshot-trunc.png, > screenshot_debugger_new.png, screenshot_debugger_not_aligned.png, > screenshot_debugger_old.png, screenshot_w7_fontsize.png, > separate_filter_choice_from_text_hex_views.diff, sonar_qube_resolve.diff, > sonar_qube_resolve_25_08.diff > > > This is a follow-up issue to PDFBOX-2530 to implement extra ideas that came > up in GSoC2015, ideas that were not implemented due to lack of time, and new > ideas. > *Viewing* > - refactor PDFDebugger.java > - render glyphs of fonts > - ✓ refactor StreamPane to share stream filtering among Text view and hex view > - ✓ password dialog when hitting protected PDF > - show "pretty" XML > - display filtered streams even if the unfiltered stream is corrupt > (PDFBOX-2976) > - ✓ display the "caused by" part exception stack trace (nested exceptions) > - ✓ keep zoom > - ✓ integrate DrawPrintTextLocations into rendering > - integrate area text extraction with a mouse-created rectangle that shows > the coordinates in a status line > - ✓ show permission flags of {{Encrypt/P}} entry > - ✓ show signature flags of {{Root/AcroForm/SigFlags}} entry, see Table 219 > in PDF spec > - show page labels additional to page number (see file from TIKA-2121 as > example) > - ✓ "reopen" menu item (useful when editing an existing PDF to create a > reduced PDF) > - choose zoom automatically so that PDF page can be seen in full > *Editing* > - save modified PDFs > - editing in hex viewer > - remove nodes (e.g. elements from a COSDictionary) > - delete array or dictionary elements > - load content streams > - edit & keep content streams -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-2941) Improve PDFDebugger (2)
[ https://issues.apache.org/jira/browse/PDFBOX-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402204#comment-16402204 ] ASF subversion and git services commented on PDFBOX-2941: - Commit 1827025 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1827025 ] PDFBOX-2941: trigger premature initializations for more accurate rendering benchmarks > Improve PDFDebugger (2) > --- > > Key: PDFBOX-2941 > URL: https://issues.apache.org/jira/browse/PDFBOX-2941 > Project: PDFBox > Issue Type: Improvement > Components: Utilities >Affects Versions: 2.0.0 >Reporter: Tilman Hausherr >Priority: Major > Attachments: gs-bugzilla694570.pdf, keep_zoom.diff, osx-tabs.png, > pdfdebugger-screenshot-reverted.png, pdfdebugger-screenshot-trunc.png, > screenshot_debugger_new.png, screenshot_debugger_not_aligned.png, > screenshot_debugger_old.png, screenshot_w7_fontsize.png, > separate_filter_choice_from_text_hex_views.diff, sonar_qube_resolve.diff, > sonar_qube_resolve_25_08.diff > > > This is a follow-up issue to PDFBOX-2530 to implement extra ideas that came > up in GSoC2015, ideas that were not implemented due to lack of time, and new > ideas. > *Viewing* > - refactor PDFDebugger.java > - render glyphs of fonts > - ✓ refactor StreamPane to share stream filtering among Text view and hex view > - ✓ password dialog when hitting protected PDF > - show "pretty" XML > - display filtered streams even if the unfiltered stream is corrupt > (PDFBOX-2976) > - ✓ display the "caused by" part exception stack trace (nested exceptions) > - ✓ keep zoom > - ✓ integrate DrawPrintTextLocations into rendering > - integrate area text extraction with a mouse-created rectangle that shows > the coordinates in a status line > - ✓ show permission flags of {{Encrypt/P}} entry > - ✓ show signature flags of {{Root/AcroForm/SigFlags}} entry, see Table 219 > in PDF spec > - show page labels additional to page number (see file from TIKA-2121 as > example) > - ✓ "reopen" menu item (useful when editing an existing PDF to create a > reduced PDF) > - choose zoom automatically so that PDF page can be seen in full > *Editing* > - save modified PDFs > - editing in hex viewer > - remove nodes (e.g. elements from a COSDictionary) > - delete array or dictionary elements > - load content streams > - edit & keep content streams -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4071) Improve code quality (3)
[ https://issues.apache.org/jira/browse/PDFBOX-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402205#comment-16402205 ] ASF subversion and git services commented on PDFBOX-4071: - Commit 1827026 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1827026 ] PDFBOX-4071: revert accidental Xmx setting change, not needed in official build > Improve code quality (3) > > > Key: PDFBOX-4071 > URL: https://issues.apache.org/jira/browse/PDFBOX-4071 > Project: PDFBox > Issue Type: Task >Affects Versions: 2.0.8 >Reporter: Tilman Hausherr >Priority: Major > Attachments: pdfbox-screenshot-bad.png, pdfbox-screenshot-good.png > > > This is a longterm issue for the task to improve code quality, by using the > [SonarQube > report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor], > hints in different IDEs, the FindBugs tool and other code quality tools. > This is a follow-up of PDFBOX-2852, which was getting too long. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4151) FlateFilter, LZWFilter causes double memory usage
[ https://issues.apache.org/jira/browse/PDFBOX-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402217#comment-16402217 ] Tilman Hausherr commented on PDFBOX-4151: - Your revised patch now works fine, thank. I tested by changing the {{-Xmx}} values. With the trunk, it worked with {{-Xmx420m}} and not with {{-Xmx410m}}. With your change, it worked with {{-Xmx380m}} and not with {{-Xmx370m}}. So we're saving around 40MB. Next thing I'll do is to review this... If I commit this change, I'll wait after the release of 2.0.9 (which is currently planned for next week), I'm getting more and scared of doing last minute changes... [~marekpribula] wrote: {quote}The subsampling helps with our problem file - the memory usage gets to the half of the previous values. But I am also confused why is it because changes in Filters play no role. {quote} It helps because the result images get smaller. > FlateFilter, LZWFilter causes double memory usage > - > > Key: PDFBOX-4151 > URL: https://issues.apache.org/jira/browse/PDFBOX-4151 > Project: PDFBox > Issue Type: Bug >Reporter: Marek Pribula >Priority: Major > Attachments: ModifiedFilters.png, OriginalFilters.png, > PDFBOX-2554-cmykrasterobjecttypes.pdf, TEST.pdf, gs-bugzilla690022.pdf, > pop-bugzilla93476.pdf, predictor_stream.patch, predictor_stream_rev2.patch > > > The problem occurred in our production during processing file with size > 400kB. The file was generated by the scanner with resolution 5960 x 8430 > pixels with 8 bit per pixel (unfortunately we have no control over files > which should be processed). Our analysis showed that problem is in > FlateFilter.decode where uncompressed data are written into > ByteArrayOutputStream. Since the final size of the file is unknown to > OutputStream its size is growing by internal call Arrays.copyOf. By the end > of processing file, this leads to usage of memory at two times file size. > What we have tried and helped in our case was slightly modification of > FlateFilter and LZWFilter decode method implementation. Here is the code > snippet of original method body: > {code:java} > @Override > public DecodeResult decode(InputStream encoded, OutputStream decoded, > COSDictionary parameters, int index) throws IOException > { > int predictor = -1; > final COSDictionary decodeParams = getDecodeParams(parameters, index); > if (decodeParams != null) > { > predictor = decodeParams.getInt(COSName.PREDICTOR); > } > try > { > if (predictor > 1) > { > int colors = Math.min(decodeParams.getInt(COSName.COLORS, 1), 32); > int bitsPerPixel = decodeParams.getInt(COSName.BITS_PER_COMPONENT, 8); > int columns = decodeParams.getInt(COSName.COLUMNS, 1); > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > decompress(encoded, baos); > ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); > Predictor.decodePredictor(predictor, colors, bitsPerPixel, columns, bais, > decoded); > decoded.flush(); > baos.reset(); > bais.reset(); > } > else > { > decompress(encoded, decoded); > } > } > catch (DataFormatException e) > { > // if the stream is corrupt a DataFormatException may occur > LOG.error("FlateFilter: stop reading corrupt stream due to a > DataFormatException"); > // re-throw the exception > throw new IOException(e); > } > return new DecodeResult(parameters); > } > {code} > and here is our implementation: > {code:java} > @Override > public DecodeResult decode(InputStream encoded, OutputStream decoded, > COSDictionary parameters, int index) > throws IOException > { > final COSDictionary decodeParams = getDecodeParams(parameters, index); > int predictor = decodeParams.getInt(COSName.PREDICTOR); > try > { > if (predictor > 1) > { > File tempFile = null; > FileOutputStream fos = null; > FileInputStream fis = null; > try { > int colors = > Math.min(decodeParams.getInt(COSName.COLORS, 1), 32); > int bitsPerPixel = > decodeParams.getInt(COSName.BITS_PER_COMPONENT, 8); > int columns = decodeParams.getInt(COSName.COLUMNS, 1); > tempFile = File.createTempFile("tmpPdf", null); > fos = new FileOutputStream(tempFile); > decompress(encoded, fos); > fos.close(); > fis = new FileInputStream(tempFile); > Predictor.decodePredictor(predictor, colors, > bitsPerPixel, columns, fis, decoded); > decoded.flush(); > } finally { > IOUtils.closeQuietly(fos); >
[jira] [Commented] (PDFBOX-4071) Improve code quality (3)
[ https://issues.apache.org/jira/browse/PDFBOX-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402195#comment-16402195 ] ASF subversion and git services commented on PDFBOX-4071: - Commit 1827021 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1827021 ] PDFBOX-4071: improve javadoc > Improve code quality (3) > > > Key: PDFBOX-4071 > URL: https://issues.apache.org/jira/browse/PDFBOX-4071 > Project: PDFBox > Issue Type: Task >Affects Versions: 2.0.8 >Reporter: Tilman Hausherr >Priority: Major > Attachments: pdfbox-screenshot-bad.png, pdfbox-screenshot-good.png > > > This is a longterm issue for the task to improve code quality, by using the > [SonarQube > report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor], > hints in different IDEs, the FindBugs tool and other code quality tools. > This is a follow-up of PDFBOX-2852, which was getting too long. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4071) Improve code quality (3)
[ https://issues.apache.org/jira/browse/PDFBOX-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402194#comment-16402194 ] ASF subversion and git services commented on PDFBOX-4071: - Commit 1827020 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1827020 ] PDFBOX-4071: improve javadoc > Improve code quality (3) > > > Key: PDFBOX-4071 > URL: https://issues.apache.org/jira/browse/PDFBOX-4071 > Project: PDFBox > Issue Type: Task >Affects Versions: 2.0.8 >Reporter: Tilman Hausherr >Priority: Major > Attachments: pdfbox-screenshot-bad.png, pdfbox-screenshot-good.png > > > This is a longterm issue for the task to improve code quality, by using the > [SonarQube > report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor], > hints in different IDEs, the FindBugs tool and other code quality tools. > This is a follow-up of PDFBOX-2852, which was getting too long. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-2941) Improve PDFDebugger (2)
[ https://issues.apache.org/jira/browse/PDFBOX-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402199#comment-16402199 ] ASF subversion and git services commented on PDFBOX-2941: - Commit 1827022 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1827022 ] PDFBOX-2941: add RGB type > Improve PDFDebugger (2) > --- > > Key: PDFBOX-2941 > URL: https://issues.apache.org/jira/browse/PDFBOX-2941 > Project: PDFBox > Issue Type: Improvement > Components: Utilities >Affects Versions: 2.0.0 >Reporter: Tilman Hausherr >Priority: Major > Attachments: gs-bugzilla694570.pdf, keep_zoom.diff, osx-tabs.png, > pdfdebugger-screenshot-reverted.png, pdfdebugger-screenshot-trunc.png, > screenshot_debugger_new.png, screenshot_debugger_not_aligned.png, > screenshot_debugger_old.png, screenshot_w7_fontsize.png, > separate_filter_choice_from_text_hex_views.diff, sonar_qube_resolve.diff, > sonar_qube_resolve_25_08.diff > > > This is a follow-up issue to PDFBOX-2530 to implement extra ideas that came > up in GSoC2015, ideas that were not implemented due to lack of time, and new > ideas. > *Viewing* > - refactor PDFDebugger.java > - render glyphs of fonts > - ✓ refactor StreamPane to share stream filtering among Text view and hex view > - ✓ password dialog when hitting protected PDF > - show "pretty" XML > - display filtered streams even if the unfiltered stream is corrupt > (PDFBOX-2976) > - ✓ display the "caused by" part exception stack trace (nested exceptions) > - ✓ keep zoom > - ✓ integrate DrawPrintTextLocations into rendering > - integrate area text extraction with a mouse-created rectangle that shows > the coordinates in a status line > - ✓ show permission flags of {{Encrypt/P}} entry > - ✓ show signature flags of {{Root/AcroForm/SigFlags}} entry, see Table 219 > in PDF spec > - show page labels additional to page number (see file from TIKA-2121 as > example) > - ✓ "reopen" menu item (useful when editing an existing PDF to create a > reduced PDF) > - choose zoom automatically so that PDF page can be seen in full > *Editing* > - save modified PDFs > - editing in hex viewer > - remove nodes (e.g. elements from a COSDictionary) > - delete array or dictionary elements > - load content streams > - edit & keep content streams -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-2941) Improve PDFDebugger (2)
[ https://issues.apache.org/jira/browse/PDFBOX-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402200#comment-16402200 ] ASF subversion and git services commented on PDFBOX-2941: - Commit 1827023 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1827023 ] PDFBOX-2941: add RGB type > Improve PDFDebugger (2) > --- > > Key: PDFBOX-2941 > URL: https://issues.apache.org/jira/browse/PDFBOX-2941 > Project: PDFBox > Issue Type: Improvement > Components: Utilities >Affects Versions: 2.0.0 >Reporter: Tilman Hausherr >Priority: Major > Attachments: gs-bugzilla694570.pdf, keep_zoom.diff, osx-tabs.png, > pdfdebugger-screenshot-reverted.png, pdfdebugger-screenshot-trunc.png, > screenshot_debugger_new.png, screenshot_debugger_not_aligned.png, > screenshot_debugger_old.png, screenshot_w7_fontsize.png, > separate_filter_choice_from_text_hex_views.diff, sonar_qube_resolve.diff, > sonar_qube_resolve_25_08.diff > > > This is a follow-up issue to PDFBOX-2530 to implement extra ideas that came > up in GSoC2015, ideas that were not implemented due to lack of time, and new > ideas. > *Viewing* > - refactor PDFDebugger.java > - render glyphs of fonts > - ✓ refactor StreamPane to share stream filtering among Text view and hex view > - ✓ password dialog when hitting protected PDF > - show "pretty" XML > - display filtered streams even if the unfiltered stream is corrupt > (PDFBOX-2976) > - ✓ display the "caused by" part exception stack trace (nested exceptions) > - ✓ keep zoom > - ✓ integrate DrawPrintTextLocations into rendering > - integrate area text extraction with a mouse-created rectangle that shows > the coordinates in a status line > - ✓ show permission flags of {{Encrypt/P}} entry > - ✓ show signature flags of {{Root/AcroForm/SigFlags}} entry, see Table 219 > in PDF spec > - show page labels additional to page number (see file from TIKA-2121 as > example) > - ✓ "reopen" menu item (useful when editing an existing PDF to create a > reduced PDF) > - choose zoom automatically so that PDF page can be seen in full > *Editing* > - save modified PDFs > - editing in hex viewer > - remove nodes (e.g. elements from a COSDictionary) > - delete array or dictionary elements > - load content streams > - edit & keep content streams -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3330) Enhance and update PDFBox website & documentation
[ https://issues.apache.org/jira/browse/PDFBOX-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401843#comment-16401843 ] Maruan Sahyoun commented on PDFBOX-3330: I've set the body text to black although we were well within the contrast recommendations with a value of 16.1 - as for the type, yes the t and the h have a different height which is because various fonts are designed this way and the system font for Windows 10 is one of these. I don't see this as an issue as the current setting is using the system specific fonts so follows the standard on that platform. Of course - if it's important - we can look for a font where this is not the case and use that. The reasoning behind changing to system fonts yet again was to keep with the standard and with the prior font selection having the same issue so offering no benefit here. I think you are used to Arial (which is similar to Helvetica) and doesn't have that effect. OTOH for systems where Arial is not available a different font will be chosen anyway which might again show that effect. > Enhance and update PDFBox website & documentation > - > > Key: PDFBOX-3330 > URL: https://issues.apache.org/jira/browse/PDFBOX-3330 > Project: PDFBox > Issue Type: Task > Components: Documentation >Reporter: Maruan Sahyoun >Priority: Major > Attachments: Bildschirmfoto von »2018-03-14 22-59-10«.png, > Bildschirmfoto von »2018-03-14 22-59-21«.png, PDFBox.Logo-0.1.0.png, > pdfbox-topbar.pdf, screenshot-1.png, toolbox.svg, topbar.png > > > General purpose ticket to track enhancements to the website and documentation -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3330) Enhance and update PDFBox website & documentation
[ https://issues.apache.org/jira/browse/PDFBOX-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401823#comment-16401823 ] ASF subversion and git services commented on PDFBOX-3330: - Commit 899f3eebe0118efa9716e8076419a455d68940d2 in pdfbox-docs's branch refs/heads/master from [~msahyoun] [ https://git-wip-us.apache.org/repos/asf?p=pdfbox-docs.git;h=899f3ee ] PDFBOX-3330: set body font to black; darken header > Enhance and update PDFBox website & documentation > - > > Key: PDFBOX-3330 > URL: https://issues.apache.org/jira/browse/PDFBOX-3330 > Project: PDFBox > Issue Type: Task > Components: Documentation >Reporter: Maruan Sahyoun >Priority: Major > Attachments: Bildschirmfoto von »2018-03-14 22-59-10«.png, > Bildschirmfoto von »2018-03-14 22-59-21«.png, PDFBox.Logo-0.1.0.png, > pdfbox-topbar.pdf, screenshot-1.png, toolbox.svg, topbar.png > > > General purpose ticket to track enhancements to the website and documentation -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-4154) Signature appearance on all pages pdfbox
[ https://issues.apache.org/jira/browse/PDFBOX-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-4154: Docs Text: (was: Hi is there any means to create signature appearances on all pages for a single digital signature using pdfbox. I have tried with itext and working fine but pdfbox is not allowing to do so..) > Signature appearance on all pages pdfbox > > > Key: PDFBOX-4154 > URL: https://issues.apache.org/jira/browse/PDFBOX-4154 > Project: PDFBox > Issue Type: Improvement > Components: AcroForm, Signing >Affects Versions: 2.0.8 > Environment: windows >Reporter: prajwal >Priority: Blocker > > > Hi is there any means to create signature appearances on all pages for a > single digital signature using pdfbox. I have tried with *itext* and working > fine but *pdfbox* is not allowing to do so.. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-4154) Signature appearance on all pages pdfbox
[ https://issues.apache.org/jira/browse/PDFBOX-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-4154: Component/s: Signing > Signature appearance on all pages pdfbox > > > Key: PDFBOX-4154 > URL: https://issues.apache.org/jira/browse/PDFBOX-4154 > Project: PDFBox > Issue Type: Improvement > Components: AcroForm, Signing >Affects Versions: 2.0.8 > Environment: windows >Reporter: prajwal >Priority: Blocker > > > Hi is there any means to create signature appearances on all pages for a > single digital signature using pdfbox. I have tried with *itext* and working > fine but *pdfbox* is not allowing to do so.. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4151) FlateFilter, LZWFilter causes double memory usage
[ https://issues.apache.org/jira/browse/PDFBOX-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401886#comment-16401886 ] Itai Shaked commented on PDFBOX-4151: - Followup on the rendering issue - it was most probably this Java bug: [https://bugs.openjdk.java.net/browse/JDK-8048782] so the solution is to either use Oracle JRE or Java>=9. > FlateFilter, LZWFilter causes double memory usage > - > > Key: PDFBOX-4151 > URL: https://issues.apache.org/jira/browse/PDFBOX-4151 > Project: PDFBox > Issue Type: Bug >Reporter: Marek Pribula >Priority: Major > Attachments: ModifiedFilters.png, OriginalFilters.png, > PDFBOX-2554-cmykrasterobjecttypes.pdf, TEST.pdf, gs-bugzilla690022.pdf, > pop-bugzilla93476.pdf, predictor_stream.patch, predictor_stream_rev2.patch > > > The problem occurred in our production during processing file with size > 400kB. The file was generated by the scanner with resolution 5960 x 8430 > pixels with 8 bit per pixel (unfortunately we have no control over files > which should be processed). Our analysis showed that problem is in > FlateFilter.decode where uncompressed data are written into > ByteArrayOutputStream. Since the final size of the file is unknown to > OutputStream its size is growing by internal call Arrays.copyOf. By the end > of processing file, this leads to usage of memory at two times file size. > What we have tried and helped in our case was slightly modification of > FlateFilter and LZWFilter decode method implementation. Here is the code > snippet of original method body: > {code:java} > @Override > public DecodeResult decode(InputStream encoded, OutputStream decoded, > COSDictionary parameters, int index) throws IOException > { > int predictor = -1; > final COSDictionary decodeParams = getDecodeParams(parameters, index); > if (decodeParams != null) > { > predictor = decodeParams.getInt(COSName.PREDICTOR); > } > try > { > if (predictor > 1) > { > int colors = Math.min(decodeParams.getInt(COSName.COLORS, 1), 32); > int bitsPerPixel = decodeParams.getInt(COSName.BITS_PER_COMPONENT, 8); > int columns = decodeParams.getInt(COSName.COLUMNS, 1); > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > decompress(encoded, baos); > ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); > Predictor.decodePredictor(predictor, colors, bitsPerPixel, columns, bais, > decoded); > decoded.flush(); > baos.reset(); > bais.reset(); > } > else > { > decompress(encoded, decoded); > } > } > catch (DataFormatException e) > { > // if the stream is corrupt a DataFormatException may occur > LOG.error("FlateFilter: stop reading corrupt stream due to a > DataFormatException"); > // re-throw the exception > throw new IOException(e); > } > return new DecodeResult(parameters); > } > {code} > and here is our implementation: > {code:java} > @Override > public DecodeResult decode(InputStream encoded, OutputStream decoded, > COSDictionary parameters, int index) > throws IOException > { > final COSDictionary decodeParams = getDecodeParams(parameters, index); > int predictor = decodeParams.getInt(COSName.PREDICTOR); > try > { > if (predictor > 1) > { > File tempFile = null; > FileOutputStream fos = null; > FileInputStream fis = null; > try { > int colors = > Math.min(decodeParams.getInt(COSName.COLORS, 1), 32); > int bitsPerPixel = > decodeParams.getInt(COSName.BITS_PER_COMPONENT, 8); > int columns = decodeParams.getInt(COSName.COLUMNS, 1); > tempFile = File.createTempFile("tmpPdf", null); > fos = new FileOutputStream(tempFile); > decompress(encoded, fos); > fos.close(); > fis = new FileInputStream(tempFile); > Predictor.decodePredictor(predictor, colors, > bitsPerPixel, columns, fis, decoded); > decoded.flush(); > } finally { > IOUtils.closeQuietly(fos); > IOUtils.closeQuietly(fis); > try { > // try to delete but don't care if it fails > tempFile.delete(); > } catch(Exception e) { > LOG.error("Could not delete > temp data file", e); > } > } > } > else > { > decompress(encoded, decoded); > } > } > catch