How can I generate a PDF document “on-the-fly” directly in users browser window?
The technique is quite simple: 1. Create a PDF Creator Pilot object and initialize it: Set PDF = CreateObject(“PDFCreatorPilot.PDFDocument4”) PDF.SetLicenseData “demo”, “demo” 2. Fill the PDF document with text, graphics etc. PDF.ShowTextAt 40, 40, “Hello.” 3. Use the “response” ASP object to stream the document to the browser directly, or write the data into the output “response” object. A byte array is required. Use the GetBuffer method of PDF Creator Pilot to get the generated PDF document as a byte array. 4. Use the following code: Response.Clear Response.ContentType = “application/pdf” Response.AddHeader “Content-Type”, “application/pdf” Response.AddHeader “Content-Disposition”, “inline;filename=test.pdf” Response.AddHeader “Content-Length”, PDF.GetBufferSize Response.BinaryWrite PDF.GetBuffer Response.End As a result, the user will see your PDF document in the browser window. You can find an example for ASP that will generate a simple PDF document and output it via browser: see V