PrintPagesToFile

レンダリングと印刷

説明

選択したドキュメントのページ範囲リストを指定されたプリンターにレンダリングします。印刷出力は指定されたスプールファイルに送られます

すべてのプリンタードライバーが DocInfo.lpszOutput フィールドに対応しているわけではないため、結果が異なる場合があります

構文

Delphi

Function TPDFlib.PrintPagesToFile(Const PrinterName, PageRanges: WideString; Options: Integer; Const FileName: WideString): Integer;

ActiveX

Function PDFlib::PrintPagesToFile(PrinterName As String, PageRanges As String, Options As Long, FileName As String) As Long

DLL

int DLPrintPagesToFile(int InstanceID, const wchar_t* PrinterName, const wchar_t* PageRanges, int Options, const wchar_t* FileName);
int DLPrintPagesToFileA(int InstanceID, const char* PrinterName, const char* PageRanges, int Options, const char* FileName);

パラメータ

PrinterName印刷に使用するプリンターの名前です。Windows Print Manager に表示される名前を指定します。システム上の有効なプリンター一覧を返すには GetPrinterNames 関数を使用します。NewCustomPrinter 関数から返された値も使用できます。
PageRanges印刷するページの一覧。例: "1-10,12,14"
Optionsこのパラメーターの値を取得するには PrintOptions 関数を使用します
FileNameこのパラメーターの値を取得するには PrintOptions 関数を使用します

戻り値

0エラーが発生しました
1ページは正常に印刷されました