DynaPDF Manual - Page 240

Previous Page 239   Index   Next Page 241

Function Reference
Page 240 of 818
if (component_value < 0)
result = 256 + component_value; // Note that we add a negative number!
result = component_value;
Non-device color spaces cannot be used for interactive objects such as annotations or form fields.
The active color space must always be changed to a device color space before creating interactive
objects; see SetColorSpace(). Note also that annotations support DeviceRGB only. Form fields
support DeviceGray, DeviceRGB, and DeviceCMYK.
Use the function SetExtColorSpace() to activate the color space in the graphics state. To set a color of
a CIE-based color space convert the color value to a 32 bit integer as described above and pass the
result to SetFillColor(), SetStrokeColor(), or SetColors().
Return values:
If the function succeeds the return value is the color space handle, a value greater or equal zero. If
the function fails the return value is a negative error code.
LBOOL pdfCreateColItemDate(
const PPDF* IPDF,
// Instance pointer
UI32 EmbFile,
// Handle of an embedded file
const char* Key,
// The key defined in the collection field
long Date,
// The date time value as integer
const char* Prefix) // Optional prefix to be added to the value
The function creates a user defined collection item which accepts a date time value. The parameter
Key must be the key that was used in the related collection field in which the value should be
The parameter Date is passed to the Ansi function localtime() or gmtime() to create a PDF
compatible date time value. Therefore, the value must be defined in the format which these
functions accept. It is usually defined as the number of seconds elapsed since midnight (00:00:00),
January 1, 1970. However, depending on the operating system, the base date can be different.
The parameter Prefix is optional. If set, it is concatenated with the text string presented to the user.
This entry is ignored when a PDF viewer application sorts the items in the collection.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: How to define CalGray colors?, How to define CalcRGB colors?, How to define Lab colors?

Next topic: CreateColItemNumber, CreateColItemString

Start Chat