[ 
https://issues.apache.org/jira/browse/PDFBOX-5174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17329353#comment-17329353
 ] 

Tilman Hausherr commented on PDFBOX-5174:
-----------------------------------------

You could try to use a scratch file with {{new 
PDDocument(MemoryUsageSetting.setupTempFileOnly())}}. Also make sure to reuse 
objects in the same PDF, i.e. create fonts and images only once.

> stream / flush PDF to outputstream
> ----------------------------------
>
>                 Key: PDFBOX-5174
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5174
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Writing
>            Reporter: Elie Roux
>            Priority: Major
>
> My use case is that I'm building pretty large PDFs with a lot of (smallish) 
> images and then write them to file. The only way to do so with PDFBox appears 
> to be building the full PDF file in memory and then write it to an 
> OutpuStream (unless there's something I didn't find?). This is possible with 
> pdflib and iText and is a blocker for my use case, since I'm doing that on 
> request on a web server that quickly goes out of memory with PDFBox



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to