DynaPDF Manual - Page 660

Previous Page 659   Index   Next Page 661

Function Reference
Page 660 of 839
Resolution > 0 and Width == 0 and Height == 0
Pages are rendered according to the given resolution. Note that PDF pages can be very large.
Therefore, it is maybe not possible to render all pages in the wished resolution.
Resolution > 0 and Width < 0 and or Height < 0
Pages are rendered according to the given resolution. Negative values of Width and Height
are interpreted as maximum width or height if Resolution is greater zero. Since PDF pages
can be very large, it is recommended to set the maximum width and height to a value that is
low enough so that no out of memory exception occurs, e.g. 5000 x 5000 pixels.
Resolution == 0 and Width > 0 or Height > 0
Pages are scaled to the given Width or Height. If Width and Height are greater zero then pages
are scaled to that size independent of the original page format (not recommended). It is
usually best to set the width or height to zero so that the function can calculate the missing
value to preserve the aspect ratio.
On a 32 bit system it is possible to render PDF pages in RGB with up to around 1200 DPI, depending
on the page format and available memory. The resolution of gray images can be higher but the
encoder must be able to handle such large images. The PNG and bitmap encoders accept images in
almost arbitrary resolutions but all other encoders can fail if the resolution is larger than about 2000
The function calls the TInitProgressProc() callback function, if set, to initialize a progress bar. The
parameter ProgType is set to ptWritePage. The TProgressProc() callback function is executed before a
page is rendered. The function breaks processing if the return value of the progress callback
function is non-zero. See SetProgressProc() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfReplaceFont(
const PPDF* IPDF,
// Instance pointer
const PFNT* PDFFont,
// Parameter of the OnFontNotFount callback
const char* Name,
// Family or Postscript name of the font
TFStyle Style,
// Font style to load
LBOOL NameIsFamilyName) // If true, Name is a Family name
The function replaces a PDF font with another one. The function can be called in the
OnFontNotFound callback function of the function CheckConformance(). The return value of the
callback function should be the return value of this function. The parameter PDFFont is a parameter
of the callback function. The pointer is required and must be passed unchanged to the function.

Previous topic: RenderPDFFile (obsolete), RenderPDFFileEx

Next topic: ReOpenImportFile, ReplaceFontEx