I have a html form inside a TIWCGHTMLSnippet component.
The form submition result in a pdf report encoded as base64, generated with this js library: PDFMake (http://pdfmake.org/#/)
I'm using this js function to generate the pdf:
- Code: Select all
function save_pdf(doc) {
pdfMake.createPdf(doc).getBase64(function(base64String) {
parent.executeAjaxEvent("&base64=" + base64String, null, "savePDF", false, null, true);
});
}
The callback "savePDF" expects the base64 pdf data to decode it and save the pdf binary file.
But the callback produce this error: "Exception class EIdReadLnMaxLineLengthExceeded with message 'Max line length exceeded.' ".
This error occurs because the base64String argument of the callback is too large.
How can I pass this large data to the server (I'm using Delphi XE5) and save the pdf file in a server folder?.