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

PrinterNameInstalled printer name
StartPageFirst page to print, using one-based numbering
EndPageLast page to print, using one-based numbering
OptionsValue returned by PrintOptions
SettingsCopies, collation, duplex, orientation, color, quality, paper and input-bin settings

Return values

0The printer name or a setting was invalid, or the print job failed
1The 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

See also

PrintPagesAdvanced, TPDFlibPrintSettings, PrintOptions