PrintDocumentToFile
Kết xuất và in
Mô tả
Render một số trang của tài liệu đang chọn ra máy in chỉ định. Đầu ra in được chuyển tới spool file chỉ định
Không phải driver máy in nào cũng hỗ trợ trường DocInfo.lpszOutput nên kết quả có thể khác nhau
Cú pháp
Delphi
Function TPDFlib.PrintDocumentToFile(Const PrinterName: WideString; StartPage, EndPage, Options: Integer; Const FileName: WideString): Integer;
ActiveX
Function PDFlib::PrintDocumentToFile(PrinterName As String, StartPage As Long, EndPage As Long, Options As Long, FileName As String) As Long
DLL
int DLPrintDocumentToFile(int InstanceID, const wchar_t * PrinterName, int StartPage, int EndPage, int Options, const wchar_t * FileName);
Tham số
| PrinterName | Tên máy in dùng để in. Đây là tên hiển thị trong Windows Print Manager. Dùng hàm GetPrinterNames để lấy danh sách máy in hợp lệ trên hệ thống; cũng có thể dùng giá trị do hàm NewCustomPrinter trả về tại đây |
|---|---|
| StartPage | Trang đầu cần in |
| EndPage | Trang cuối cần in |
| Options | Dùng hàm PrintOptions để lấy giá trị cho tham số này |
| FileName | Tên file để spool đầu ra in |