PrintDocument
渲染和打印
描述
将所选文档的某些页面渲染到指定打印机
语法
Delphi
Function TPDFlib.PrintDocument(Const PrinterName: WideString; StartPage, EndPage, Options: Integer): Integer;
ActiveX
Function PDFlib::PrintDocument(PrinterName As String, StartPage As Long, EndPage As Long, Options As Long) As Long
DLL
int DLPrintDocument(int InstanceID, const wchar_t* PrinterName, int StartPage, int EndPage, int Options);
int DLPrintDocumentA(int InstanceID, const char* PrinterName, int StartPage, int EndPage, int Options);
参数
| PrinterName | 用于打印的打印机名称。这是 Windows Print Manager 中显示的名称。使用 GetPrinterNames 函数返回系统中有效打印机列表。此处也可使用 NewCustomPrinter 函数返回的值。 |
|---|---|
| StartPage | 要打印的第一页 |
| EndPage | 要打印的最后一页 |
| Options | 使用 PrintOptions 函数获取此参数的值 |
返回值
| 0 | 无法打印页面,通常由 StartPage 和 EndPage 参数超出范围导致 |
|---|---|
| 1 | 页面已成功打印 |