Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DynaPDF.AttachFileText
Attaches a file to the document.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 6.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| The PDF reference returned from DynaPDF.New. | |||
| Text | The text content for the file. | $xml | |
| TextEncoding | The text encoding for the text. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
"UTF-8" | |
| FileName | The file name to display in PDF viewer. | "ZUGFeRD-invoice.xml" | |
| Description | The description for the file. | "invoice.xml" | Optional |
| Compress | Pass 1 to compress or 0 to not compress. You should pass 1 for text data like XML or JSON. |
0 | Optional |
Result
Returns OK or error.
Description
Attaches a file to the document.The description is optional, the parameter can be set to "". 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 file becomes larger as the uncompressed version. However, text files and most document formats should be compressed to reduce the file size.
Examples
Add ZUGFeRD invoice xml file:
Set Variable [$FileHandle; Value:MBS("DynaPDF.AttachFileText"; $pdf; ZUGFeRD Invoice::Invoice XML; "UTF-8"; "ZUGFeRD-invoice.xml"; "Invoice as XML")]
Set Variable [$r; Value:MBS("DynaPDF.AssociateEmbFile"; $pdf; "Catalog"; -1; "Alternative"; $FileHandle)]
See also
Example Databases
- DynaPDF/ZUGFeRD/ZUGFeRD Invoice
- DynaPDF/ZUGFeRD 2.0/Factur-X Invoice
- DynaPDF/ZUGFeRD 2.0/ZUGFeRD 2.0 Invoice
Blog Entries
- FileMaker with ZUGFeRD 2.0 and Factur-X
- Creating PDF/A in FileMaker with ZUGFeRD standard
- Creating PDF/A in FileMaker with ZUGFeRD standard
FileMaker Magazin
Created 16th December 2015, last changed 29th September 2017
DynaPDF.AttachFileContainer - DynaPDF.BeginContinueText
Feedback: Report problem or ask question.
Links
MBS Xojo blog