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.SetMetadata
The function sets or replaces the XMP metadata stream of a specific object.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 5.2 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. | ||
| ObjType | The object type. Can be Catalog, Font, Image, Page or Template. | "Catalog" |
| Handle | Object handle or -1 for the catalog object. | -1 |
| XMP | The XMP metadata as text. |
Result
Returns OK or error.
Description
The function sets or replaces the XMP metadata stream of a specific object.The function deletes the XMP stream if no buffer will be provided.
If the global XMP stream of the Catalog object should be replaced then proceed as follows:
- Set the wished output PDF version with DynaPDF.SetPDFVersion.
- Get a preview of the XMP stream with DynaPDF.GetMetadata.
- Modify the returned stream as needed and save it with DynaPDF.SetMetadata, finished!
See also SetMetadata function in DynaPDF manual.
Examples
Read, change and write XMP metadata:
Set Variable [ $pdf ; Value: MBS("DynaPDF.New") ]
# Load PDF from container
Set Variable [ $r ; Value: MBS("DynaPDF.OpenPDFFromContainer"; $pdf; Merge PDFs::InputPDF) ]
Set Variable [ $r ; Value: MBS("DynaPDF.ImportPDFFile"; $pdf; 1) ]
#
# get current XMP
Set Variable [ $xmp ; Value: MBS("DynaPDF.GetMetadata"; $pdf; "catalog"; -1) ]
#
# delete XMP metadata
// Set Variable [ $r ; Value: MBS("DynaPDF.SetMetadata"; $pdf; "") ]
#
# or write new XMP metadata
Set Variable [ $r ; Value: MBS("DynaPDF.SetMetadata"; $pdf; "catalog"; -1; $XMP) ]
#
# save
Set Field [ Merge PDFs::FinalPDF ; MBS("DynaPDF.Save"; $pdf; "Merged.pdf") ]
Set Variable [ $r ; Value: MBS("DynaPDF.Release"; $pdf) ]
See also
- DynaPDF.GetInMetadata
- DynaPDF.GetMetadata
- DynaPDF.ImportPDFFile
- DynaPDF.New
- DynaPDF.OpenPDFFromContainer
- DynaPDF.Release
- DynaPDF.Save
- DynaPDF.SetLeading
- DynaPDF.SetPDFVersion
Blog Entries
Created 29th July 2015, last changed 16th December 2020
DynaPDF.SetMetaConvFlags - DynaPDF.SetMiterLimit
Feedback: Report problem or ask question.
Links
MBS Xojo tutorial videos