Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0, 2.0.1, 3.0.0 PDFBox
-
None
Description
cbremaud mentioned in PDFBOX-2716:
You may want to change the javadoc because this is now possible to use saveIncremental() function on PDDocument loaded with InputStream.
I checked this and yes, it works with a stream, because since the rewrite of the caching stuff, the stream contents are stored in a file or in memory when the PDF is loaded from a stream. The javadoc wasn't changed in rev 1688018.
Then I tried this:
new PDDocument().saveIncremental(new FileOutputStream(new File("huhu.pdf")));
this results in an NPE. So I'm adding a check in saveIncremental(), similar to the check that was removed in 1688018, likely because nobody thought about the weird code above.
Attachments
Issue Links
- relates to
-
PDFBOX-2716 Use saveIncremental() method on a document opened with an InputStream does not work
- Closed