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

DynaPDF Manual - Page 193

Previous Page 192   Index   Next Page 194

Function Reference
Page 193 of 750
ConnectPageBreakEvent
Syntax:
Public Sub ConnectPageBreakEvent(
ByVal Connect As Boolean) // If True, the event is connected
This procedure connects the OnPageBreakEvent with the internal callback function so that the event
function can be raised by the wrapper class CPDF. This function is included in the Visual Basic and
VB .Net interfaces only. The manually connection of the event function is required to avoid different
runtime behaviour of the function WriteFText().
ConvColor
Syntax:
UI32 pdfConvColor(
const double* Color,
// Array of color components
UI32 NumComps,
// Number of color components
TExtColorSpace SourceCS, // Source color space
const void* IColorSpace, // Pointer to internal color space object
TExtColorSpace DestCS)
// Destination color space
The function converts a color of a PDF color space to a device color space. The function was
originally designed to convert colors of a PDF color space which was returned by the content parser,
but it is also possible to use the function stand alone, e.g. to calculate a spot color of a DeviceN or
Separation color space.
If used with the content parser, the required parameters Color, NumComps, SourceCS, and IColorSpace
are provided in the TSetFillColor or TSetStrokeColor callback functions. See ParseContent() for
further information.
The parameter DestCS defines the destination color space into which the color should be converted.
The destination color space must be a device color space (esDeviceGray, esDeviceRGB, or
esDeviceCMYK).
If the function should be used stand alone, the parameters SourceCS and IColorSpace are provided in
the TPDFColorSpaceObj structure, see GetColorSpaceObj() for further information.
The array Color represents a color defined in the PDF color space. The array must be at least
NumInComponents values long. The number of color components is provided in the
TPDFColorSpaceObj structure.
The color components must be defined in the range of the color space, that is typically 0 through 1
for Device, ICCBased, Calibrated, DeviceN, NChannel, and Separation color spaces.
The default range of a Lab color space is [0..100, -128..127, -128..127] . The range of the L channel is
fixed, it ranges always from 0 though 100. The range of the a and b components can be restricted if
the color space contains a Range array.
 

Previous topic: ComputeBBox

Next topic: ConvertColors