Create a PDF Document in ASP and View in the Browser
A sample ASP script using PDFBuilderASP
This example demonstrates the use of the PDFBuilderASP component in an ASP script to generate a single page PDF document and display it in the client browser. The document is a simple invoice which is customised to show the name and address of a customer which have been sent to the ASP script using an HTTP POST operation. This represents a typical application for this component.
To run this example now, complete the name and address fields further down this page and then click on the "Create PDF" button to submit the form data to the sample script on our server. (Note that we are not recording the data you enter, it is just being used to build the example PDF). After the script runs, a fictitious invoice in PDF format will be displayed in your browser.
To set this example up on your own server, download the trial version of PDFBuilderASP and a copy of the ASP script used for this demo from the links below.
Run the Example Script to Create an Invoice
By clicking on the "Create PDF" button below, the information entered in the name and address fields is submitted to an ASP script on our server. This script then creates a PDF document using PDFBuilderASP. The script demonstrates how images are added (a company logo), how graphics are drawn (various rectangles and lines to show boxes on the invoice) and the writing of several text fields. Most of the text on the document is fixed, but the three data fields for the customer's name and address will be completed using the submitted information.
Finally, the document is displayed by being streamed directly to the browser using the BinaryWrite command in PDFBuilderASP.