Xojo Conferences

DynaPDF Manual - Page 207

Previous Page 206   Index   Next Page 208

Function Reference
Page 207 of 770
The function can be used multiple times without causing a memory leak. The internal used
conversion buffer is freed automatically before the function is executed. However, the buffer can be
freed manually with the function FreeUniBuf().
This function depends not on an open PDF file; it can be used at any time. The conversion algorithms
are binary save but because no string length is used the string must not contain null characters
(except to terminate the string). No error messages are displayed if this function fails.
Return values:
If the function succeeds the return value is a pointer to null-terminated Unicode string in the byte
ordering supported by the CPU. If the function fails the return value is NULL.
LBOOL pdfCopyChoiceValues(
const PPDF* IPDF, // Instance pointer
UI32 Source,
// Source field handle
UI32 Dest,
// Destination field handle
LBOOL Share)
// If true, both fields share the same list items
The function copies the list items, default value, and value of the source field to the destination field.
The source and destination field can be combo and list boxes. It is allowed to copy the list items of a
list box to a combo box or vice versa.
If Share is true, the function adds just a reference to the list item so that both fields share the same list
items. This is still the case if more list items will be added to such a field. If Share is false, the list
items will be copied to the destination field. Both fields contain independent list items in this case.
Already existing list items of the destination field will be deleted.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: ConvToUnicode

Next topic: Create3DAnnot