Blank result #924
-
I'm trying a simple pdf just to test. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); Paragraph page1Body = new Paragraph("Page one content."); document.newPage(); document.close(); //send bytes back to browser as application/pdf I always get an empty pdf file. Am I missing something trivial here? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Got it working. Needed to have responseType = "blob" in my ajax call so the bytes are handled as a binary file. My bad... |
Beta Was this translation helpful? Give feedback.
Got it working.
Was not related to OpenPDF at all.
My javascript code receiving the file was the problem.
Needed to have
responseType = "blob"
in my ajax call so the bytes are handled as a binary file.
My bad...