PrintDocumentAdvanced
Rendering and printing
Description
Prints one contiguous page range through a single printer job while applying a typed TPDFlibPrintSettings record to the Windows printer profile
Syntax
Delphi
Function TPDFlib.PrintDocumentAdvanced(Const PrinterName: WideString; StartPage, EndPage, Options: Integer; Const Settings: TPDFlibPrintSettings): Integer;
Parameters
| PrinterName | Installed printer name |
|---|---|
| StartPage | First page to print, using one-based numbering |
| EndPage | Last page to print, using one-based numbering |
| Options | Value returned by PrintOptions |
| Settings | Copies, collation, duplex, orientation, color, quality, paper and input-bin settings |
Return values
| 0 | The printer name or a setting was invalid, or the print job failed |
|---|---|
| 1 | The print job completed successfully |
Remarks
Zero-initialize Settings to retain printer defaults, then set only the required members
Use PrintPagesAdvanced when the job needs non-contiguous, reordered, odd or even page ranges