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

DynaPDF Manual - Page 244

Previous Page 243   Index   Next Page 245

Function Reference
Page 244 of 750
CreateImportDataAction
Syntax:
SI32 pdfCreateImpDataAction(
const PPDF* IPDF,
// Instance pointer
const char* DataFile) // File path to FDF file
An import data action imports FDF data into the document's interactive form. FDF data files are
normally created by Adobe's Acrobat when submitting a form to a web server.
Note that the XML based format XFDF is not supported by Adobe's Acrobat.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. However, because
Acrobat does not support Unicode strings as file paths, the path is converted back to Ansi. A
Unicode string must not contain characters outside of the code page 1252.
Actions must be added to a PDF object with AddActionToObj().
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
CreateIndexedColorSpace
Syntax:
SI32 pdfCreateIndexedColorSpace(
const PPDF* IPDF,
// Instance pointer
TExtColorSpace Base,
// Base color space
SI32 Handle,
// Color space handle or -1 depending on Base
const void* ColorTable,
// Array of colors
UI32 NumColors)
// Number of colors in the array
The function creates an indexed color space which can be used for vector graphics and text output.
The parameter Base defines the underlying base color space. It can be any device or ICC-based color
space or separation space, but not a pattern space or another indexed space.
The parameter Handle must be a handle of the underlying base color space if no device color space is
used. If a device color space is used the parameter Handle is ignored.
The color table must be defined as an array of color values defined in the corresponding base color
space. For example, if the base color space is DeviceRGB, the values in the color table are to be
interpreted as red, green, and blue components; if the base color space is a CIE-based ABC space
such as a CalRGB or Lab space, the values are to be interpreted as A, B, and C components.
The number of components is taken from the base color space. The parameter NumColors defines the
number of color values defined in the array. An indexed color space cannot contain more than 256
colors.
 

Previous topic: CreateImage

Next topic: CreateJSAction