PrintDocument

Rendering and printing

Description

Renders certain pages from the selected document to the specified printer.

Syntax

Delphi

function TPDFlib.PrintDocument(Const PrinterName: WideString; StartPage, EndPage, Options: Integer): Integer;

ActiveX

Function PDFlib::PrintDocument(PrinterName As String, StartPage As Long, EndPage As Long, Options As Long) As Long

DLL

int DLPrintDocument(int InstanceID, wchar_t * PrinterName, int StartPage, int EndPage, int Options);

Parameters

PrinterNameThe name of the printer to use for printing. This is the name that appears in the Windows Print Manager. Use the GetPrinterNames function to return a list of valid printers on the system. A value returned by the NewCustomPrinter function can also be used here. The first page to print
StartPage
EndPageThe last page to print
OptionsUse the PrintOptions function to obtain a value for this parameter

Return values

0The pages could not be printed, usually caused by the StartPage and EndPage parameters being out of range
1The pages were printed successfully