Print Method

The Print method is used to print the document to a specified printer.

Syntax

C++:

HRESULT Print (BSTR PrinterName, BOOL Prompt)

C#:

void Print (string printerName, bool prompt)

VB:

Sub Print (PrinterName As String, Prompt As Boolean)

Parameters

PrinterName

If no printer name is specified, the document is printed to the default printer.

Prompt

If this parameter is set to True, the user is prompted with the printer selection dialog box.

See also the StartPrint, PrintPage, EndPrint, PrintPage Event sections.

Example in C#:

pdf.Open("PDF2.pdf", "");

// print two copies of the document

pdf.Copies = 2;

// scale page in both directions (if size is different

// than that of printer paper)

pdf.ScaleToPrinter = acScaleConstants.acScaleBoth;

pdf.Print("HP LaserJet 6L", 0);