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

DynaPDF Manual - Page 308

Previous Page 307   Index   Next Page 309

Function Reference
Page 308 of 750
File attachment annotations are supported since PDF 1.3 (Acrobat 4). File attachments are supported
since PDF 1.4 (Acrobat 5). The difference between both attachment types is that a file attachment
annotation is used as a comment that has usually a visible icon on a page, e.g. to provide additional
information about a specific object.
File attachments are used to add arbitrary files to the PDF file, e.g. job options, the original document
from which the file was created, or any other file (see also AttachFile()).
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.
FileLink
Syntax:
SI32 pdfFileLink(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of bounding rectangle
double PosY,
// Y-Coordinate of bounding rectangle
double Width,
// Width of bounding rectangle
double Height,
// Height of bounding rectangle
const char* AFilePath) // File path
The function creates a file link annotation. A file link annotation opens a file by using the application
that is connected with the file extension (MIME type). Viewer applications maybe display a warning
before the file is opened.
The file path can be defined as relative or absolute path. However, the usage of an absolute makes
only sense if it can be guaranteed that the path exist on an arbitrary system.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the
bounding rectangle. If the coordinate system is top-down it defines the upper left corner.
The border of the link annotation is drawn by using the current line width, stroke color and line dash
pattern. If the link should appear without a border set the line width to zero beforehand.
When clicking on a link annotation the rectangle is highlighted, that is a simple visual effect. Several
highlight modes are supported, see SetLinkHighlightMode() for further information.
 

Previous topic: FileAttachAnnot

Next topic: FindBookmark