PrintPagesToFile
渲染和打印
描述
将选定文档中的页面范围列表渲染到指定打印机。打印输出定向到指定的假脱机文件
并非所有打印机驱动程序都支持 DocInfo.lpszOutput 字段,因此结果可能有所不同
语法
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);
参数
| PrinterName | 用于打印的打印机名称,此名称显示在 Windows 打印管理器中,使用 GetPrinterNames 返回系统中有效打印机列表,也可在此使用 NewCustomPrinter 返回的值;要打印的页面列表,例如 "1-10,12,14" |
|---|---|
| PageRanges | |
| Options | 使用 PrintOptions 函数获取此参数的值 |
| FileName | 使用 PrintOptions 函数获取此参数的值 |
返回值
| 0 | 发生错误 |
|---|---|
| 1 | 页面已成功打印 |