Skip to content
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

Runs out of memory when parsing large pdfs or epubs #8

Open
pgarrison opened this issue Mar 28, 2014 · 0 comments
Open

Runs out of memory when parsing large pdfs or epubs #8

pgarrison opened this issue Mar 28, 2014 · 0 comments
Labels

Comments

@pgarrison
Copy link
Owner

A stack trace from a 500-page pdf:
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:201)
at com.itextpdf.text.pdf.PdfReader.FlateDecode(PdfReader.java:1845)
at com.itextpdf.text.pdf.PdfReader.FlateDecode(PdfReader.java:1711)
at com.itextpdf.text.pdf.PdfReader.decodeBytes(PdfReader.java:2220)
at com.itextpdf.text.pdf.PdfReader.getStreamBytes(PdfReader.java:2311)
at com.itextpdf.text.pdf.PdfReader.readObjStm(PdfReader.java:1215)
at com.itextpdf.text.pdf.PdfReader.readDocObj(PdfReader.java:1157)
at com.itextpdf.text.pdf.PdfReader.readPdf(PdfReader.java:512)
at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:172)
at com.itextpdf.text.pdf.PdfReader.(PdfReader.java:161)
at com.speedreader.Options$14.run(Options.java:448)

And one from an epub:
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:201)
at nl.siegmann.epublib.util.IOUtil.copy(IOUtil.java:79)
at nl.siegmann.epublib.util.IOUtil.toByteArray(IOUtil.java:43)
at nl.siegmann.epublib.domain.Resource.(Resource.java:48)
at nl.siegmann.epublib.util.ResourceUtil.createResource(ResourceUtil.java:68)
at nl.siegmann.epublib.epub.EpubReader.readResources(EpubReader.java:157)
at nl.siegmann.epublib.epub.EpubReader.readEpub(EpubReader.java:74)
at nl.siegmann.epublib.epub.EpubReader.readEpub(EpubReader.java:69)
at nl.siegmann.epublib.epub.EpubReader.readEpub(EpubReader.java:35)
at com.speedreader.Options$12.run(Options.java:373)

@pgarrison pgarrison added the bug label Mar 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant