Hi,
I am using Cete Dynamic PDF 4.0.3. I am able to generate the PDF using the Cete library and am able to open it on my local machine. but when I tries to send the same PDF as a response to an HTTP Request, I get the following error:
java.lang.ArrayIndexOutOfBoundsException: 4096
at com.cete.dynamicpdf.io.linearization.b.writeText(Unknown Source)
at com.cete.dynamicpdf.merger.nb.draw(Unknown Source)
at com.cete.dynamicpdf.merger.r.a(Unknown Source)
at com.cete.dynamicpdf.merger.gb.drawEntries(Unknown Source)
at com.cete.dynamicpdf.merger.gb.draw(Unknown Source)
at com.cete.dynamicpdf.merger.r.a(Unknown Source)
at com.cete.dynamicpdf.merger.gb.drawEntries(Unknown Source)
at com.cete.dynamicpdf.merger.gb.draw(Unknown Source)
at com.cete.dynamicpdf.merger.r.a(Unknown Source)
at com.cete.dynamicpdf.merger.gb.drawEntries(Unknown Source)
at com.cete.dynamicpdf.merger.AppendedPage.drawEntries(Unknown Source)
at com.cete.dynamicpdf.Page.draw(Unknown Source)
at com.cete.dynamicpdf.io.linearization.b.f(Unknown Source)
at com.cete.dynamicpdf.io.linearization.b.draw(Unknown Source)
at com.cete.dynamicpdf.Document.a(Unknown Source)
at com.cete.dynamicpdf.Document.drawToWeb(Unknown Source)
i cant share the original PDF because it contains Personal Information Details, but the size of the file is 9.52MB.
Please find the code below:
---------------------------------------
lStream = pResponse.getOutputStream();
pResponse.setContentType("application/pdf");
HighSecurity sec = new HighSecurity();
if (lDocument == null)
{
lDocument = text2pdf
.getDocumentFromAString("Failed to retrieve documents for Document key = "
+ lSecurityKey + ". See log for details.");
}
lDocument.setSecurity(sec);
lDocument.drawToWeb(pRequest, pResponse, lStream, MergedPDFs.pdf");
lStream.flush();
lStream.close();