PrintPagesToFile
Rendering and printing
Description
Renders a list of page ranges from the selected document to the specified printer. The print output is directed to the specified spool file.
Not all printer drivers support the DocInfo.lpszOutput field so results may vary.
Syntax
Delphi
function TPDFlib.PrintPagesToFile(Const PrinterName, PageRanges: WideString; Options: Integer; Const FileName: WideString): Integer;ActiveX
Function PDFlib::PrintPagesToFile(PrinterName As String, PageRanges As String, Options As Long, FileName As String) As LongDLL
int DLPrintPagesToFile(int InstanceID, wchar_t * PrinterName, wchar_t * PageRanges, int Options, wchar_t * FileName);Parameters
| PrinterName | The name of the printer to use for printing. This is the name that appears in the Windows Print Manager. Use the GetPrinterNames function to return a list of valid printers on the system. A value returned by the NewCustomPrinter function can also be used here. A list of pages to print, for example "1-10,12,14" |
|---|---|
| PageRanges | |
| Options | Use the PrintOptions function to obtain a value for this parameter |
| FileName | Use the PrintOptions function to obtain a value for this parameter |
Return values
| 0 | An error occurred |
|---|---|
| 1 | The pages were printed successfully |