DynaPDF Manual - Page 15
Previous Page 14 Index Next Page 16
Page 15 of 821
With very few exceptions, string values returned by DynaPDF are always null-terminated. A
string length returned by DynaPDF is always the length excluding the null-terminator.
#define ADDR &
#define ADDR *
Functions in DynaPDF, which pass a value to a function parameter are handled differently in C
and C++. C does not support the address operator & so that var parameters are defined as normal
pointers to pointers in C. DynaPDF checks whether a variable or NULL was passed to a function
before the function tries to access the variable. However, C++ does not allow to set a parameter to
NULL if it was declared with the address operator &.
Beginning with DynaPDF 2.5 all structures which can be extended in future versions contain the
member StructSize. This variable must be set to sizeof(StructureName). The structure size is used
to identify the version of a structure so that extensions do not break backward compatibility.
The structure size is automatically set in interfaces for C#, Visual Basic, Visual Basic .Net, and
Delphi. C/C++ programmers must set this member before the corresponding function can be
cmap.StructSize = sizeof(TPDFCMap);
pdfGetCMap(pdf, handle, &cmap);
DynaPDF supports Unicode strings in UTF-16-LE format on little-endian machines and UTF-16-
BE on big-endian machines. On target systems which use UTF-32 (LE or BE) as default string
format such as Linux or most UNIX OS, all strings must be converted to UTF-16 before passing to
You can use the predefined macro ToUTF16 to do this.
Previous topic: Data types
Next topic: Unicode File Paths, CJK Multi-byte Strings