DynaPDF Manual - Page 336

Previous Page 335   Index   Next Page 337

Function Reference
Page 336 of 787
GetAllocBy
Syntax:
SI32 pdfGetAllocBy(
const PPDF* IPDF) // Instance pointer
The function returns the pre-allocated buffer size of page content streams in bytes. Memory
allocation is slow, especially re-allocation of memory by using realloc(). Because of this all content
streams are buffered by DynaPDF to avoid too much memory allocation calls. The property AllocBy
defines the size of memory that is allocated each time when more memory must be allocated.
The processing speed depends heavily on memory allocation. The default size of pre-allocated
memory for content streams is 16 KB. It can be set to a larger or smaller value if necessary to
improve processing speed.
However, if too much memory is allocated at runtime, processing speed will be slower and an out of
memory exception can occur. If the size is too small, processing speed is slower too because of the
many memory allocation calls. In most cases, it is not required to change the property AllocBy.
GetAnnot (obsolete)
Syntax:
SI32 pdfGetAnnot(
const PPDF* IPDF)
// Instance pointer
UI32 Handle,
// Annotation handle
struct TPDFAnnotation ADDR Annot) // see below
struct TPDFAnnotation
{
TAnnotType
Type;
// Annotation type
LBOOL
Deleted;
// Is this annotation marked as deleted?
struct TPDFRect BBox;
// Bounding box in bottom-up coordinates
double
BorderWidth;
// Border width -> see comment below
UI32
BorderColor;
// Border color -> see comment below
TBorderStyle
BorderStyle;
// Border style
UI32
BackColor;
// Background color -> see comment below
UI32
Handle;
// Annotation handle
char*
AuthorA;
// Annotation's author, Ansi format
UI16*
AuthorW;
// Annotation's author, Unicode format
char*
ContentA;
// Annotation's contents, Ansi format
UI16*
ContentW;
// Annotation's contents, Unicode format
char*
NameA;
// Annotation's name, Ansi format
UI16*
NameW;
// Annotation's name, Unicode format
char*
SubjectA;
// Annotation's subject, Ansi format
UI16*
SubjectW;
// Annotation's subject, Unicode format
UI32
PageNum;
// Page on which the annotation appears
THighlightMode
HighlightMode; // Visual effect
};
This function retrieves the most important properties of an annotation. This function is marked as
obsolete and should no longer be used. Please use GetAnnotEx() if possible.
All strings are pointers to the original string buffers or NULL if not set. The application must not
change or free these values. Only one string can be set at time, either the Ansi string or Unicode
string but not both. String values are always null-terminated.
 

Previous topic: GetActionTypeEx, GetActiveFont

Next topic: GetAnnotBBox, GetAnnotCount

Start Chat