PrintDocument
Rendering and printing
Mô tả
Render một số trang của tài liệu đang chọn ra máy in chỉ định
Cú pháp
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);
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 Trang đầu tiên cần in |
|---|---|
| StartPage | |
| EndPage | The last page to print |
| Options | Dùng hàm PrintOptions để lấy giá trị cho tham số này |
Giá trị trả về
| 0 | Không in được các trang, thường do tham số StartPage và EndPage vượt khoảng hợp lệ |
|---|---|
| 1 | Đã in các trang thành công |