-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split crashing for PDF with 2,000 pages #344
Comments
You can try increasing your Xms size. Try setting the env variable |
I tried both setting JAVA_OPTS and modifying the sejda-console.bat
For the JAVA_OPTS I am getting: Unfortunately I am unable to share the file as it contains some sensitive data. Is there other way I should set the xmx/xms or maybe I can run some jar file directly? As a note, my laptop has 32GB RAM and java version is: |
Could you try with |
C:\Users\tomas.greif>C:\Users\xxx\Desktop\split\sejda-console-3.2.67\bin\sejda-console splitbyevery -f "C:\Users\tomas.greif\Desktop\split\01-04-18 2.pdf" -o C:\Users\tomas.greif\Desktop\split\out -n 1 -p [CURRENTPAGE#####]
Configuring Sejda 3.2.67
Document root element "sejda", must match DOCTYPE root "null".
Document is invalid: no grammar found.
Starting execution with arguments: 'splitbyevery -f C:\Users\xxx\Desktop\split\01-04-18 2.pdf -o C:\Users\xxx\Desktop\split\out -n 1 -p [CURRENTPAGE#####]'
Java version: '1.8.0_191'
Validating parameters.
Starting task (org.sejda.impl.sambox.SplitByPageNumbersTask@62379589) execution.
Opening C:\Users\xxx\Desktop\split\01-04-18 2.pdf
Found 0 inherited images and 0 inherited fonts potentially unused
Starting split by page numbers for org.sejda.model.parameter.SplitByEveryXPagesParameters@50a638b5[step=1,optimizationPolicy=AUTO,discardOutline=false,outputPrefix=[CURRENTPAGE#####],output=org.sejda.model.output.FileOrDirectoryTaskOutput@1189dd52[C:\Users\tomas.greif\Desktop\split\out],sourceList=[C:\Users\xxx\Desktop\split\01-04-18 2.pdf],compress=true,version=VERSION_1_6,existingOutputPolicy=FAIL,lenient=false,1]
Starting split at page 1 of the original document
Created output temporary buffer C:\Users\xxx\Desktop\split\out.sejdaTmp8635042219708410613.tmp
Task progress: 0% done
Filtering annotations
Skipped acroform merge, nothing to merge
Ending split at page 1 of the original document, generated document size is 11.68 KB
Starting split at page 2 of the original document
Created output temporary buffer C:\Users\xxx\Desktop\split\out.sejdaTmp4677890173653656260.tmp
Exception in thread "main" java.lang.StackOverflowError
at java.util.Spliterator.getExactSizeIfKnown(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.sejda.sambox.pdmodel.PDPageTree.getKids(PDPageTree.java:172)
at org.sejda.sambox.pdmodel.PDPageTree.get(PDPageTree.java:318)
at org.sejda.sambox.pdmodel.PDPageTree.get(PDPageTree.java:327)
at org.sejda.sambox.pdmodel.PDPageTree.get(PDPageTree.java:327)
at org.sejda.sambox.pdmodel.PDPageTree.get(PDPageTree.java:327)
at org.sejda.sambox.pdmodel.PDPageTree.get(PDPageTree.java:327)
The text was updated successfully, but these errors were encountered: