| ImageEn, unit iexMetaHelpers |
|
TIEMetaListView.SaveMetaToFile
Declaration
function SaveMetaToFile(const FileName: string; AMetaTypes: TIEMetaTypes): Boolean;
Description
Injects or updates the EXIF, IPTC and/or Dicom values or PDF properties in a file with the values specified in the control.
if AMetaTypes is [], all editable types (iemEXIF, iemIPTC, iemDicom and iemPDF) will be saved.
Note:
◼An exception will be raised if the file does not exist, or the image format does not support that data type
◼PDF properties (Title, Author, Subject, Keywords, Creator and Producer) require the
PDFium PlugIn. They are appended to the file as an incremental update, so the content of the document is not changed. Encrypted PDF files cannot be updated
◼Do not use SaveMetaToFile for a PDF file that is open in a
TIEPdfViewer. Instead, save the document using the PdfViewer (if
iemoDirectEdit is in
Options or you have called
AssignTo, the changes will be included)
Example
// Save changes to the current EXIF and IPTC meta data
IEMetaListView1.SaveMetaToFile( ImageEnView1.IO.Params.Filename, [ iemEXIF, iemIPTC ]);
// Save changes to the current Dicom tags
IEMetaListView1.SaveMetaToFile( ImageEnView1.IO.Params.Filename, [ iemDICOM ]);
// Update the title and author of a PDF file
IEMetaListView1.SaveMetaToFile( 'D:\Adobe Document.pdf', [ iemPDF ]);