DynaPDF Manual - Page 437

Previous Page 436   Index   Next Page 438

Function Reference
Page 437 of 839
Example (C++):
float* points = NULL;
TPDFAnnotationEx annot;
UI32 i, j, numAnnots, count = 0;
pdfEditPage(pdf, 1);
numAnnots = pdfGetPageAnnotCount(pdf);
for (i = 0; i < numAnnots; i++)
{
if (pdfGetPageAnnotEx(pdf, i, annot))
{
if (annot.Type == atInk)
{
for (j = 0; j < annot.InkListCount; j++)
{
if (pdfGetInkList(annot.InkList[j], &points, &count))
{
// Do something with the path
}
}
}
}
}
pdfEndPage(pdf);
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
GetInMetadata
Syntax:
LBOOL pdfGetInMetadata(
const PPDF* IPDF, // Instance pointer
SI32 PageNum,
// Page number or -1 to access the global XMP stream
BYTE** Buffer,
// Address of a BYTE* pointer
UI32* BufSize)
// Address of an unsigned integer variable
The function can be used to access the optional metadata streams of pages or the global metadata
stream of the current open import file. Metadata streams are in XMP format that is a superset of
XML. The PDF file must be opened with OpenImportImportFile() or OpenImportBuffer()
beforehand.
Although the global XMP stream does usually exist in todays PDF files, metadata streams are
optional and maybe not present. The function returns true if no error occurs, also if no metadata
stream is present. The caller must also check whether the parameter BufSize was set to a value
greater zero to determine whether stream data was returned.
The parameter Buffer is assigned to the original stream buffer, if any. DynaPDF is the owner of this
data. Do not modify or free the returned memory block.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: GetInIsTrapped, GetInIsXFAForm, GetInkList

Next topic: GetInNamedDest (obsolete), GetInNamedDestCount (obsolete), GetInOrientation