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

DynaPDF Manual - Page 560

Previous Page 559   Index   Next Page 561

Function Reference
Page 560 of 750
Maximum output resolution
The default maximum output resolution is 600 DPI to restrict the memory usage and to reduce the
amount of data that must be send to the printer. The output resolution can be adjusted if necessary
with printing parameters, see blow.
Print parameters
The optional parameter Parms can be used to adjust certain default print settings. The member
StructSize must be set to sizeof(TPDFPrintParams), otherwise the parameter Parms will be ignored.
If Compress is set to true, the function tries to send compressed images to the printer. The function
checks first whether the printer supports compressed images. If compressed images are not
supported then the function restarts the print job and sends uncompressed images to the printer (a
warning is added to the error log in this case (see GetErrLogMessage() for further information)).
JPEG compression is recommended for color print jobs and PNG compression for gray or black &
white output.
Note that many printer support JPEG compression but Flate compression is often not supported
(PNG images). It is usually best to check with ExtEscape() whether PNG images are supported
before this compression filter is set. If JPEG compression is used then the JPEG quality should not be
lower than 60% for text documents to avoid visible compression artifacts.
Visual Basic 6 interface
Because VB6 has no direct support of optional structure parameters, the parameter Parms is defined
as optional parameter of type long.
The structure TPDFPrintParams can be passed to the function as follows:
Dim r As TRectL, p As TPDFPrintParams
p.StructSize
= LenB(p)
p.Compress
= True
p.FilterGray
= cfFlate
p.FilterColor = cfFlate
p.MaxRes
= 150
Call pdf.PrintPDFFile(vbNullString, FileName, Printer.hDC, pffDefault, r, VarPtr(p))
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: Print flag pffNoStartPage

Next topic: ReadImageFormat (obsolete)