[
https://issues.apache.org/jira/browse/PDFBOX-5068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260435#comment-17260435
]
Ralf Hauser commented on PDFBOX-5068:
-------------------------------------
Xmx12m was on the basis of CreateVisibleSignature.java
With CreateVisibleSignature2.java, it dies
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
at org.apache.fontbox.pfb.PfbParser.readPfbInput(PfbParser.java:171)
at org.apache.fontbox.pfb.PfbParser.<init>(PfbParser.java:101)
at org.apache.fontbox.type1.Type1Font.createWithPFB(Type1Font.java:54)
at
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider$FSFontInfo.getType1Font(FileSystemFontProvider.java:267)
at
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider$FSFontInfo.getFont(FileSystemFontProvider.java:131)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:452)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperImpl.java:392)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImpl.java:366)
at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:146)
at org.apache.pdfbox.pdmodel.font.PDType1Font.<clinit>(PDType1Font.java:68)
at
org.apache.pdfbox.examples.signature.CreateVisibleSignature2.createVisualSignatureTemplate(CreateVisibleSignature2.java:398)
at
org.apache.pdfbox.examples.signature.CreateVisibleSignature2.signPDF(CreateVisibleSignature2.java:253)
For CreateVisibleSignature2.java, I had to increase to Xmx19m
> OutOfMemory while signing large documents - continued
> -----------------------------------------------------
>
> Key: PDFBOX-5068
> URL: https://issues.apache.org/jira/browse/PDFBOX-5068
> Project: PDFBox
> Issue Type: Improvement
> Components: Signing
> Affects Versions: 2.0.23
> Reporter: Ralf Hauser
> Priority: Major
> Attachments: RandomAccessReadBufferDiag.java, minimum.pdf
>
>
> Continuation of PDFBOX-2512
>
> in COSWriter.prepareIncrement(), for the test case
> cosDoc.getXrefTable().keySet() has size 5925. For each of thes keys,
> cosDoc.getObjectFromPool() gets an object that is not just referencing some
> part of the input document, but duplicates it (which is unavoidable in the
> case where they are decompressed with FlateFilter - albeit this could
> possibly be done "lazy")
> -Xmx20m 746/5925
> -Xmx25m 1615/5925
> -Xmx30m 2800/5925
> -Xmx40m 3872/5925
> -Xmx55m 5773/5925
> With 60m, it gets them all, but dies later with less telling
> java.lang.OutOfMemoryError: GC overhead limit exceeded
>
> This assumes the patch of PDFBOX-5067 already in place - or using
> CreateVisibleSignature2.java as starting point
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]