pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Knight <jeffrey.kni...@gmail.com>
Subject PDDocument save / saveIncremental
Date Wed, 19 Apr 2017 19:58:07 GMT
I'm building large pdfs on the fly (1000 pages) and am looking for a way to
incrementally save results to the OutputStream
(response.getOutputStream()) page
by page as I go, rather than having to build all 1000 pages before doing a
final call to:

> document.save(response.getOutputStream())

PDDocument's saveIncremental() looked so promising, but I see that it can
only be used

> "if the PDF was loaded from a file or a stream, not if the document was
created in PDFBox itself."

Is there any way to flush out the document's current state as I go, or do I
have to wait for the final .save() when I'm done?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message