Ciansoft Banner

Write and Format Text in a PDF Document in ASP

A sample ASP script using PDFBuilderASP

The ASP component PDFBuilderASP includes several functions for formatting text that is written to a PDF file. This example script demonstrates the use of these functions.

To run this example script, download the trial version of PDFBuilderASP and a copy of the ASP script used for this demo from the links below.

Trial version of PDFBuilderASP. (504kB)

Download the example ASP script. (3kB)

Running the example script

To run the example, extract the file pbaspdemotext1.asp from the downloaded zip file and copy this file to a web server directory. A True Type font file must also be copied to this directory and the script edited to refer to this file on the line which includes the AddFont command. Open the ASP page in a browser and a PDF file will be created and displayed.

More detailed instructions for running this script are available in the readme.txt file in the download.

The following properties and methods are demonstrated by this script: AddFont, TextFont, TextSize, TextColor, TextLineSpacing, TextMaxWidth, TextAlign and WriteText. Try editing the various lines of code to see the effect on the PDF document produced.

© Ciansoft 2016.    |    Ciansoft is a trading name of IC Technologies Ltd.