PrintPagesAdvanced

Rendering and printing

Description

Prints an arbitrary page-range expression through one printer job while applying copies, collation, duplex, orientation, color, quality, paper-size and input-bin settings

Syntax

Delphi

Function TPDFlib.PrintPagesAdvanced(Const PrinterName, PageRanges: WideString; Options: Integer; Const Settings: TPDFlibPrintSettings): Integer;

Parameters

PrinterNameInstalled printer name
PageRangesOne-based page expression accepted by PrintPages, including lists such as 1-4,7,10-8 and the All, Odd or Even selectors
OptionsValue returned by PrintOptions
SettingsTyped TPDFlibPrintSettings record applied before the job starts

Return values

0The printer name, page expression or a setting was invalid, or the print job failed
1The print job completed successfully

Remarks

The page expression is passed to the selected GDI+, Cairo or PDFium print backend without splitting it into separate jobs, preserving range order and job-level copies, collation and duplex behavior

Zero-initialize Settings to retain printer defaults

See also

PrintDocumentAdvanced, PrintPages, TPDFlibPrintSettings