DynaPDF Manual - Page 349
Previous Page 348 Index Next Page 350
Function Reference
Page 349 of 839
Note that Acrobat 7 or higher restricts access to executable files and compressed file formats such as
zip, or rar. If such files must be embedded then change the file extension, e.g. to .dat or .bin. The
user must then change the extension again when extracting the file.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. Note that Unicode file
paths are not supported under Linux and UNIX. The file path is converted back to Ansi on these
operating systems before trying to open the file. This conversion can cause problems if the file name
contains special characters which are not convertible to Ansi.
Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If
the function fails the return value is a negative error code.
FileAttachAnnotEx
Syntax:
SI32 pdfFileAttachAnnotEx(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate for the annotation icon
double PosY,
// Y-Coordinate for the annotation icon
TFileAttachIcon Icon, // Annotation icon
const char* FileName, // File name including extension (required)
const char* Author,
// Optional author
const char* Desc,
// Optional description
const void* Buffer,
// File buffer (required)
UI32 BufSize,
// Buffer size in bytes (required)
LBOOL Compress)
// If true, the embedded file will be compressed
The function creates a file attachment annotation exactly in the same way as FileAttachAnnot() but
accepts a file buffer as input. See FileAttachAnnot() for further information. The parameter FileName
is required. It should contain the file name including extension, e.g. "MyImage.jpg".
Remarks:
The function is available in an Ansi and Unicode version.
Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If
the function fails the return value is a negative error code.
Previous topic: FileAttachAnnot
Next topic: FileLink