Mac OS X
Components Crossplatform Mac & Win Server Client Old Guides Examples
New in version: 7.5 8.0 8.1 8.2 8.3 8.4 8.5 9.0 9.1 9.2 Statistic
Inserts a file attachment annotation on the current open page.
|Component||Version||macOS||Windows||Server||FileMaker Cloud||FileMaker iOS SDK|
|The PDF reference returned from DynaPDF.New.|
|PosX||X-Coordinate for the annotation icon||100|
|PosY||Y-Coordinate for the annotation icon||100|
|Icon||Which icon to use. Can be Graph, PaperClip, PushPin or Tag.||"Graph"|
|Author||Name of author. Can be empty.||"Christian Schmitz"|
|Description||Description text. Can be empty.||"Original File"|
|FilePath||The native file path to the file to embed.||"/Users/cs/Desktop/test.mp3"|
|Compress||If 1, the embedded file is compressed. Pass 0 for no compression.||0|
Returns annotation handle or error.
DescriptionInserts a file attachment annotation on the current open page.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left point of the annotation icon. If the coordinate system is top-down it defines the upper left point. The width and height of the icon is not changeable.
The embedded file is compressed if the parameter Compress is set to 1. Otherwise it is left uncompressed. It is not always useful to compress embedded files especially if the file is already compressed, e.g. Zip files or already compressed image formats require no further compression. In the worst case the compressed files becomes larger. However, text files and most document formats should be compressed to reduce the file size.
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 DynaPDF.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.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
See also FileAttachAnnot function in DynaPDF manual.
Created 28th November 2014, last changed 30th November 2014
Feedback: Report problem or ask question.
MBS Xojo Chart Plugins