Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 559

Previous Page 558   Index   Next Page 560

Function Reference
Page 559 of 750
struct TPDFPrintParams
{
UI32
StructSize;
// Must be set to sizeof(TPDFPrintParams).
LBOOL
Compress;
// Meaningful only for image output. If true, compressed images
// are send to the printer.
TCompressionFilter FilterGray;
// Meaningful only for image output. Supported filters on
// Windows: cfFlate and cfJPEG.
TCompressionFilter FilterColor;
// Meaningful only for image output. Supported filters on
// Windows: cfFlate and cfJPEG.
UI32
JPEGQuality;
// JPEG Quality in percent (1..100). Zero == Default == 60%.
UI32
MaxRes;
// Maximum print resolution. Zero == Default == 600 DPI.
LBOOL
IgnoreDCSize; // If true, PageSize is used to calculate the output format.
TIntRect
PageSize;
// Considered only, if IgnoreDCSize is set to true.
};
The function prints the PDF file that is currently in memory. At time of publication the function is
implemented on Windows only and pages are printed as image.
The parameter DocName is optional but should be set if possible. The document name is set to "out" if
no name is provided.
Output color format
It is possible to determine which color formats a printer supports as input, but it is not possible to
determine whether a printer outputs black & white, gray shades, or color. The default should be set
to gray or 1 bit but the user should be able to configure the color format.
Progress callback functions
The function calls the progress callback functions if set (see SetProgressProc() for further
information). TInitProgressProc is called with ProgType set to ptPrintPage and MaxCount is set to the
number of pages.
The progress callback function is called right before the next page is send to the printer (right before
StartPage() is called). The progress callback function must return zero to continue processing. Any
other return value breaks processing.
Print flag pffNoStartPage
If the flag pffNoStartPage is set, the function behaves as follows:
The Windows function StartPage() must be called inside the progress callback function. The
progress callback function is required if the flag pffNoStartPage ist set! The progress callback
functions can be set with SetProgressProc().
If ActivePage is greater 1, the Windows function EndPage() must be called.
If the return value of the progress callback function should be non-zero to break processing,
the function must still call EndPage() if ActivePage is greater 1.
If the flag pffNoEndDoc is absent, the function calls EndPage() for the last page. If the flag
pffNoEndDoc is set too, EndPage() is not called for the last page.
If you want to print a watermark or something similar on top of all pages, the flag pffNoEndDoc
should be set too, otherwise it is not possible to print additional contents on the last page.
 

Previous topic: PrintPDFFile

Next topic: Visual Basic 6 interface