PrintDocumentToFile
렌더링 및 인쇄
설명
선택한 문서의 특정 페이지를 지정된 프린터로 렌더링합니다. 인쇄 출력은 지정된 스풀 파일로 전달됩니다
일부 프린터 드라이버는 DocInfo.lpszOutput 필드를 지원하지 않으므로 결과가 달라질 수 있습니다
구문
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);
int DLPrintDocumentToFileA(int InstanceID, const char* PrinterName, int StartPage, int EndPage, int Options, const char* FileName);
매개변수
| PrinterName | 인쇄에 사용할 프린터의 이름입니다 Windows Print Manager에 표시되는 이름입니다 GetPrinterNames 함수를 사용하여 시스템의 유효한 프린터 목록을 반환합니다 NewCustomPrinter 함수가 반환한 값도 여기에서 사용할 수 있습니다 |
|---|---|
| StartPage | 인쇄할 첫 페이지 |
| EndPage | 인쇄할 마지막 페이지 |
| Options | PrintOptions 함수를 사용하여 이 매개변수의 값을 가져옵니다 |
| FileName | 인쇄 출력을 스풀링할 파일 이름 |
반환 값
인쇄 작업이 출력을 스풀 파일로 리디렉션한 채로 전송되면 1을 반환합니다. 프린터 이름이 유효하지 않거나 인쇄 작업이 실패하거나 취소되었으면 0을 반환합니다.