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

DynaPDF Manual - Page 180

Previous Page 179   Index   Next Page 181

Function Reference
Page 180 of 750
// not allowed, path must be closed
fmFillStrokeEvOddNoClose, // not allowed, path must be closed
// close but do not paint the path
// same as fmNoFill
This function marks the current path as clipping path. The function must be called after a closable
path was created. A path that consists of a MoveTo() and LineTo() only call cannot be closed!
A clipping path can also be filled, stroked, or both in one pass. However, the combination of a
clipping path operator with a path painting operator is seldom used and not supported in all PDF
viewers. To avoid unnecessary problems a path should always be clipped and painted in two
separate steps, also if this causes some unnecessary overhead.
Once the clipping was created and activated with ClipPath() you can draw arbitrary contents into it,
such as images, text, or vector graphics.
A clipping path is part of the current graphics state. The only way to deactivate a clipping path is to
restore the graphics state with RestoreGraphicState(). This assumes that it was saved with
SaveGraphicState() before the clipping path was created.
Note that it is not possible to extend or widen an active clipping path. It is only possible to intersect it
with a new one. The intersection of two clipping paths is never larger than the initial clipping path.
Text objects are handled separately in PDF for use as clipping path. See SetTextDrawMode() for
further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfCloseAndSignFile(
const PPDF* IPDF,
// Instance pointer
const char* CertFile, // File path to a PKCS#12 certificate file
const char* Password, // Password to decrypt the cert's private key
const char* Reason,
// Optional reason string
const char* Location) // Optional signers location string
This function finishes the PDF file, digitally signs it, and frees all used resources if the file was not
created in memory. The parameter CertFile must be a valid path to a PKCS#12 certificate file.
The internal signature handler of DynaPDF supports certificate files with 1024 bits encrypted private
keys only. However, if certificates with a stronger encryption should be used it is possible to sign the
file with an external signature handler, like the Windows CryptAPI (see CloseAndSignFileExt() for
further information).

Previous topic: ClipPath

Next topic: Possible function errors