Xojo Conferences

DynaPDF Manual - Page 701

Previous Page 700   Index   Next Page 702

Function Reference
Page 701 of 750
SI32 MaxCount);
// The number of callback function calls
typedef SI32 PDF_CALL TProgressProc(
const void* Data,
// User defined pointer
SI32 ActivePage);
// Current page number
The function sets two callback functions which can be used to control a progress bar. This function is
absent in the Visual Basic interface because this interface uses events instead of callback functions.
The progress callback functions are called when importing a PDF file with ImportPDFFile(), when
printing a PDF file with PrintPDFFile(), and when closing the current PDF file.
The parameter Data is a user defined pointer which is passed unchanged to the callback functions.
The parameter InitProgress defines the callback function that is called before the progress callback
function is called the first time. The parameters of this callback function can be used to initialize a
progress bar. The parameter ProgType of the initialization callback function defines the current
process; this can be either importing a page or writing a page.
Other operations do not call the progress callback functions because most operations are too fast as if
they could be used to display the current progress.
The parameter MaxCount defines how often the progress callback function will be called.
The callback functions use the calling convention standard call on Windows. It is required to use the
correct calling convention; a wrong calling convention causes an access violation!
To disable the progress callback functions set the parameters InitProgress and Progress to NULL.
Return values of the progress callback function:
The return value of the progress callback function must be 0, any other return value breaks
Return values (SetProgressProc()):
If the function succeeds the return value is 1. If the function fails the return value is 0.
LBOOL pdfSetResolution(
const PPDF* IPDF, // Instance pointer
UI32 Value)
// Image resolution in DPI
The function sets the resolution in DPI (Dots per Inch), in which images are stored by DynaPDF. The
property will be ignored if the property SaveNewImageFormat was set to false. 1 bit images are always
stored in the original resolution. The image resolution must be in the range 72 to 2048 DPI.
Default value = 150 (DPI)
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: SetProgressProc

Next topic: SetSeparationInfo