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ố

PrinterNameTê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
EndPageThe last page to print
OptionsDùng hàm PrintOptions để lấy giá trị cho tham số này

Giá trị trả về

0Khô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