PrintPDFFile Method
Top  Previous  Next


Prints a PDF (Portable Document Format) document from a PDF file (*.pdf). This method prints the document immediately using your existing PDF reader application (e.g Adobe Acrobat Reader). There is no need to use any of the control properties. See remarks below.


Syntax

object.PrintPDFFile(PDFFileName)

Where object evaluates to an ASP Printer object.


The PrintPDFFile method has these arguments:


PartDescription  


PDFFileNameString expression specifying the fully qualified file name of the PDF file to print.  



Remarks

This method enables you to print a PDF document form a PDF file using your existing PDF reader application (the application associated with opening and printing PDF files, such as the Adobe Acrobat Reader). The file will be printed exactly as you see it in the "Actual Size" view in the PDF reader, including any images, layout, fonts, margin settings, etc. There is no need to set or use any of the ASP Printer object properties.

The following code line shows how to use this method to print a PDF document from a PDF file:

   ASPPrinter.PrintPDFFile "C:\MyPDFFile.PDF"

Note that by using this method, all object properties are ignored, whether set (or not) before calling this method. Also, setting the printer using the SetPrinter method will have no effect. The PDF document is sent to the default system printer.

Note that if you have no PDF reader application installed on your system, the PrintPDFFile method will fail.

When you use this method to print a PDF file, no Print Dialog will be displayed before sending the document to the printer.