Components for Developers
© 2000-2010, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

How to print a PDF document

 

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)

 

See also

How to create a new PDF document
How to place an image into PDF
How to write text in a PDF document
How to draw simple elements, such as a line, circle, or arc, with different attributes
How to manipulate primitives to clip drawing objects
How to create PDF with ASP.NET on the web server without Visual Studio
How to create PDF with PHP on the web server
How to create PDF with Python on the web server
How to create or edit PDF with Python
How to convert metafile to PDF using C++
How to convert image to PDF using VB.NET
How to extract text from PDF documents
How to place a Attachments into PDF document
How to create a Sound Annotations in PDF document
How to print a PDF document

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

PDF Library | PDF Rasterizer | Virtual Printers | Converters
Help Creator | Web Form Maker | Design Service

Support | Blog | Forum | Contacts | About
Site map

© 2000-2010, Two Pilots