Mac OS X
Components Crossplatform Mac & Win Server (Not) Client Old Guides Examples
New in version: 6.1 6.2 6.3 6.4 6.5 7.0 7.1 7.2 7.3 7.4 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.
Feedback: Report problem or ask question.
MBS FileMaker blog