DynaPDF Manual - Page 407

Previous Page 406   Index   Next Page 408

Function Reference
Page 407 of 787
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()
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
GetInNamedDest (obsolete)
LBOOL pdfGetInNamedDest(
const PPDF* IPDF,
// Instance pointer
UI32 Index,
// Array index
struct TPDFNamedDest* Dest) // Structure to be filled
This function is no longer supported. Please use the new function GetNamedDest() instead.

Previous topic: GetInkList

Next topic: GetInNamedDestCount (obsolete), GetInIsSigned

Start Chat