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
| PrinterName | Installed printer name |
|---|---|
| PageRanges | One-based page expression accepted by PrintPages, including lists such as 1-4,7,10-8 and the All, Odd or Even selectors |
| Options | Value returned by PrintOptions |
| Settings | Typed TPDFlibPrintSettings record applied before the job starts |
Return values
| 0 | The printer name, page expression or a setting was invalid, or the print job failed |
|---|---|
| 1 | The 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