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ページは正常に印刷されました