Use:

ByteArrayInputStream pdfBytesInputStream = <YOUR SOURCE OF BYTES>
...
PDDocument pdfDoc = null;
try {
        pdfDoc =  PDDocument.load(pdfBytesInputStream, new 
RandomAccessBuffer());
....

This is designed for exactly the situation you describe.

--Ken

On Sep 26, 2010, at 12:12 PM, Jeff Hall wrote:

> Hello, I am a new PDFBox user trying to use PDFBox to create PDF content
> within a servlet and return that content via attachment to the browser.  The
> problem I have is that when I try to create a new PDDocument, I get a
> Security error.  I believe that is due to the hosting server (Google App
> Engine) that isn't allowing my servlet to do any File IO.  I am hoping to
> find some help and guidance on using PDFBox with the ServletOutputStream
> without the use of FileIO.
> 
> Appreciate your help.
> 
> Jeff

Reply via email to