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

DynaPDF Manual - Page 345

Previous Page 344   Index   Next Page 346

Function Reference
Page 345 of 750
BOOL pdfGetEmbeddedFile(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Handle of an embedded file
struct TPDFFileSpec* FileSpec, // See below
LBOOL Decompress)
// If true, the file is decompressed
struct TPDFFileSpec
char* Buffer;
// Buffer of an embedded file.
UI32 BufSize;
// Buffer size in bytes.
LBOOL Compressed;
// Should be false if Decompress was true.
void* ColItem;
// Pointer to user defined collection item.
char* Name;
// Name of the file specification in the name tree.
LBOOL NameUnicode; // Is Name in Unicode format?
char* FileName;
// File name as 7 bit ASCII string.
// If true, FileName contains a URL.
char* UF;
// PDF 1.7. Same as FileName but Unicode is allowed.
LBOOL UFUnicode;
// Is UF in Unicode format?
char* Desc;
// Description.
LBOOL DescUnicode; // Is Desc in Unicode format?
UI32 FileSize;
// Decompressed stream size or zero if not known.
char* MIMEType;
// MIME media type name (RFC 2046).
char* CreateDate;
// Creation date as string.
char* ModDate;
// Modification date as string.
char* CheckSum;
// 16 byte MD5 digest if set.
The function retrieves the most important properties of an embedded file as well as a pointer to the
file buffer. If the parameter Decompress is set to true the embedded file stream is decompressed. Set
this parameter to true if you want to extract the embedded file. Otherwise the parameter should be
set to false. DynaPDF decompresses Flate compressed embedded file streams only. However, other
filters can occur but this is unusual. If the file buffer was successfully decompressed the member
Decompressed of the structure TPDFFileSpec is set to true.
The structure TPDFFileSpec contains pointers to the original values of the embedded file. These
values must not be changed or freed in your application.
Return values:
If the function succeeds the return value 1 and the structure TPDFFileSpec is filled with values. If the
function fails the return value is 0.

Previous topic: GetDynaPDFVersionInt

Next topic: GetEmbeddedFileNode