PDF Viewer ActiveX Control

PrinterOpenPDF

 

Open the for print the PDF without display the PDF.

Public Function PrinterOpenPDF( 
  ByVal strFile  As String
 ) as bool

 

Parameter
the path of PDF file.

Return Value
Return true if successful, otherwise return false.

Example

   

Visual Basic Syntax
PDFViewer1.PrinterOpenPDF "c:\yourfile.pdf"
PDFViewer1.PrinterSetPrinterName "Microsoft Print to PDF"
PDFViewer1.PrinterSetPageOrientation 0
PDFViewer1.PrinterSetPageRange 1, 10
PDFViewer1.PDFPrint
'when the form close, call the following code
PDFViewer1.PrinterClosePDF