PrintPagesToFile
Renderização e impressão
Descrição
Renderiza uma lista de intervalos de páginas do documento selecionado para a impressora especificada. A saída de impressão é direcionada para o arquivo de spool especificado
Nem todos os drivers de impressora suportam o campo DocInfo.lpszOutput, portanto os resultados podem variar
Sintaxe
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 Long
DLL
int DLPrintPagesToFile(int InstanceID, const wchar_t * PrinterName, const wchar_t * PageRanges, int Options, const wchar_t * FileName);
Parâmetros
| 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 a função PrintOptions para obter um valor para este parâmetro |
| FileName | Use a função PrintOptions para obter um valor para este parâmetro |
Valores retornados
| 0 | An error occurred |
|---|---|
| 1 | The pages were printed successfully |