Applies to
Declaration
property ResultBuffer: Variant;
byte[] ResultBuffer;
Description
This property provides the result of the PDF creation as memory buffer (variant array of bytes).
Also see the "ASP TransferHelper" - it avoids flooding the server.
Note: RTF2PDF may be only used on a web server when you have the Server License of RTF2PDF / wPDFControl!
Example: (Response is the ASP object defined in event Page_Load.)
// Initialize pdf creation
rtf2pdf.PdfCreator.PDFFile = "memory";
rtf2pdf.PdfCreator.FontMode = 0; // embed all fonts!
rtf2pdf.Memo.ReformatAll(false,false);
rtf2pdf.Print();
// remove any output
Response.Clear();
// Add new HTTP header
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Type", "application/pdf");
// Set a file name which is displayed
Response.AddHeader("Content-Disposition","inline;filename=PortableDocument.pdf");
// Write the PDF data
Response.Clear();
Response.BinaryWrite(rtf2pdf.ResultBuffer);