How to print a PDF document


Home       Download       Features       Tutorials       FAQ       Pricing       News

 

This sample illustrates how to print a PDF document using the default printer. (The process is similar for any other specified printer.) You can use PDF Creator Pilot’s printing functionality independent of on any third party components.

For printing a PDF document with the help of PDF Creator Pilot, use the DrawPageToDC method. This method draws a specified PDF page to a device context. The method takes the following 5 parameters:

hdc
  Handle of the device context

pageNumber
  Number of target page

zoomX
  Horizontal zoom

zoomY
  Vertical zoom

drawControls
  Draw controls

So, to print the PDF document on the printer, you need to get the device context of the printer and then call the DrawPageToDC method with the specified parameters.

Below you can download samples, demonstrating how to print a PDF document in C++, C#, and VB.Net.

 

Download Sample Code

Print a PDF document using C/C++ (35Kb)

Print a PDF document using C# (17Kb)

Print a PDF document using VB.NET (23Kb)

 


Home       Download       Features       Tutorials       FAQ       Pricing       News