Debenu Quick PDF logo

RenderPageToFile

Rendering and printing

Description

This function renders a page from the selected document to a file on disk. The data written to disk depends on the Options parameter.

By default rendering uses the GDI+ system which is available by default in Windows XP and later.

Option 10, TIFF (G4) output, is only available on Windows Vista and Windows Server 2008 and later.

It is also possible to render using AGG, use the SetDPLRFileName and SelectRenderer functions.

Syntax

Delphi

function TDebenuPDFLibrary1811.RenderPageToFile(DPI: Double; Page, Options: Integer; 
  FileName: WideString): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::RenderPageToFile(DPI As Double,
  Page As Long, Options As Long, FileName As String) As Long

DLL

int DPLRenderPageToFile(int InstanceID, double DPI, int Page, int Options,
  wchar_t * FileName)

Parameters

DPI The DPI to use when rendering the page. Values over 300 will cause excessive memory usage.
Page The page number to render
Options 0 = BMP output
1 = JPEG output
2 = WMF output
3 = EMF output
4 = EPS output
5 = PNG output
6 = GIF output
7 = TIFF (LZW) output
8 = EMF+ output
9 = HTML5 output
10 = TIFF (G4) output
FileName The path and file name of the file to create to store the rendered page image data in.

Return values

0 The page could not be rendered
1 The page was rendered correctly and the image file was saved to disk
2 The file could not be written to disk

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport