DynaPDF Manual - Page 589

Previous Page 588   Index   Next Page 590

Function Reference
Page 589 of 787
typedef enum
{
pffDefault
= 0,
// Gray printing
pff1Bit
= 1,
// Recommended for b&w printers
pffColor
= 2,
// Color printing
pffAutoRotateAndCenter = 4,
// Rotate and center pages if necessary
pffPrintAsImage
= 8,
// Default on Windows
pffShrinkToPrintArea
= 16,
// Useful if a page contains no margins
pffNoStartDoc
= 32,
// Do not call StartDoc on Windows
pffNoStartPage
= 64,
// Do not call StartPage on Windows
pffNoEndDoc
= 128, // Do not call EndDoc on Windows
pffPrintPageAsIs
= 256, // Do not scale or rotate a page to fit into the printable area
pffAutoRotate
= 512, // Rotate the page if necessary
pffAutoCenter
= 1024 // Center the page
}TPDFPrintFlags;
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:
 

Previous topic: PrintPage, PrintPDFFile

Next topic: Maximum output resolution, Print parameters, Visual Basic 6 interface

Start Chat