DynaPDF Manual - Page 388
Previous Page 387 Index Next Page 389
Function Reference
Page 388 of 839
A DynaPDF version string consists of 4 four parts: major version, revision (unused, always zero),
minor version, and build number.
Example:
4.0.3.7 = Major = 4, revision (always zero), minor = 3, build = 7.
The same version as an integer would be calculated as follows:
Version = Major * 10000000 + Minor * 10000 + Build
The above version string would be returned as 40030007 = 4 * 10000000 + 3 * 10000 + 7.
Return values:
If the function succeeds the return value is the version number, a value greater zero. If the function
fails the return value is zero.
GetEmbeddedFile
Syntax:
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.
LBOOL IsURL;
// 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.
Previous topic: GetDocUsesTransparency, GetDrawDirection, GetDynaPDFVersion, GetDynaPDFVersionInt
Next topic: GetEmbeddedFileCount, GetEmbeddedFileNode