DynaPDF Manual - Page 632

Previous Page 631   Index   Next Page 633

Function Reference
Page 632 of 839
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.
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).
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: Output color format, Progress callback functions, Print flag pffNoStartPage

Next topic: ReadImageFormat (obsolete)