Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.AttachFileContainer
Attaches a data from container to the document.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 6.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.AttachFileContainer"; PDF; Container; FileName { ; Description; Compress } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
Container | The container value to use. | $xmlContainer | |
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 data from container 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.
Use DynaPDF.AttachFile for a file on disk and DynaPDF.AttachFileText for text.
See also AttachFileContainer function in DynaPDF manual.
See also
Release notes
- Version 12.2
- Fixed DynaPDF.AttachFileContainer to allow PDF containers to be attached.
Example Databases
Blog Entries
This function checks for a license.
Created 15th December 2015, last changed 17th January 2024