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

DynaPDF Manual - Page 391

Previous Page 390   Index   Next Page 392

Function Reference
Page 391 of 750
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.
Usage (C++):
pdfOpenImportFile(pdf, "c:/test.pdf", ptOpen, NULL);
BYTE* buffer = NULL;
UI32 bufSize = 0;
if (pdfGetInMetadata(pdf, -1, &buffer, &bufSize))
{
if (bufSize > 0)
{
// Do something with the data
}
}
 

Previous topic: GetInkList

Next topic: GetInIsSigned