RenderDocumentToFileA
רינדור והדפסה
תיאור
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to RenderDocumentToFile and string arguments are interpreted using the current SetAnsiMode code page
מעבד עמודים מסוימים מהמסמך הנבחר לקובץ תמונה בדיסק
כברירת מחדל, העיבוד משתמש במערכת GDI+ הזמינה כברירת מחדל ב־Windows XP ובגרסאות מאוחרות יותר. אפשרות 10, פלט TIFF (G4), זמינה רק ב־Windows Vista וב־Windows Server 2008 ובגרסאות מאוחרות יותר
אפשר לעבד גם באמצעות Cairo; השתמשו בפונקציות SetCairoFileName ו-SelectRenderer
תחביר
Delphi
Function DLRenderDocumentToFileA(InstanceID: Integer; DPI: Double; StartPage, EndPage, Options: Integer; FileName: PAnsiChar): Integer;
DLL
int DLRenderDocumentToFileA(int InstanceID, double DPI, int StartPage, int EndPage, int Options, const char * FileName);
פרמטרים
| DPI | ה-DPI שישמש לרינדור. ערך של 72 ייתן אותה תוצאה כמו Acrobat כאשר רמת התצוגה היא 100%. |
|---|---|
| StartPage | The first page to print |
| EndPage | The last page to print |
| Options | 0 = BMP output 1 = JPEG output 2 = WMF output 3 = EMF output 4 = EPS output 5 = PNG output 6 = GIF output 7 = TIFF output 8 = EMF+ output 9 = HTML5 output 10 = G4 TIFF output The path and filename to use for the file. Each page will be stored in a separate file. If this parameter contains "%p" this will be replaced by the page number, otherwise the page number will be appended to the end of the filename before the extension. For example, if FileName is "output.jpg" and page 10 is rendered the image will be stored in a file called "output10.jpg". If FileName is "page%poutput.bmp" and page 5 is rendered the image will be stored in a file called "page5output.bmp". |
| FileName |
ערכי החזרה
| 0 | The pages were not rendered successfully. This is usually caused by the StartPage or EndPage parameters being out of range. |
|---|---|
| 1 | The pages were rendered successfully |