PrintDocumentToPrinterObject

Rendering and printing

Description

Renders certain pages from the selected document to the printer specified by the Delphi TPrinter object.

Syntax

Delphi

Function TPDFlib.PrintDocumentToPrinterObject(APrinter: TPrinter; StartPage, EndPage, Options: Integer): Integer;

Parameters

APrinterA Delphi TPrinter object
StartPageThe first page to print
EndPageThe last page to print
OptionsUse the PrintOptions function to obtain a value for this parameter

Return values

Returns 1 when the page range was sent to the printer. Returns 0 when the print job was cancelled before it started or rendering failed; check LastRenderError for the reason.