简体   繁体   English

适用于ExifTool的正确cmd行,用于pdf元标记

[英]Proper cmd line for ExifTool for pdf meta tagging

I'm having issues getting exiftools to write custom meta tags for my pdf files. 我在获取exiftools来为我的pdf文件编写自定义元标记时遇到问题。 In MacOS terminal with exiftools installed. 在装有exiftools的MacOS终端中。 Here's a sample command. 这是一个示例命令。

exiftool -overwrite_original -config 
new.config -XMP::pdfx:document_id=”7A 2017 091 d” -XMP::pdfx:description=”Booklet on stuff and more stuff” pdf_files/7A_2017_091_d.pdf

Here's the config lines: 这是配置行:

#user-defined pdfs
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::pdfx' => {
        document_id => { },
        description => { },
    },
);
1;  #end

All I get back is: 我得到的是:

Warning: Tag 'XMP::pdfx:Document_id' is not defined
Warning: Tag 'XMP::pdfx:Description' is not defined
Nothing to do.

What am I doing wrong? 我究竟做错了什么?

This is the config file that worked for me: 这是为我工作的配置文件:

#user-defined pdfs
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::pdfx' => {
        document_id => { Writable => 'string', },
        description => { Writable => 'string',},
    },
);
1;  #end  

And the command line with results (you don't need the config file to read XMP tags, just write) 以及带有结果的命令行(您不需要配置文件即可读取XMP标签,只需编写即可)

C:\\>exiftool -config temp.txt -xmp-pdfx:document_id="test" -xmp-pdfx:description="Description Test" y:/!temp/test.pdf
1 image files updated

C:\\>exiftool -xmp-pdfx:document_id -xmp-pdfx:description y:/!temp/test.pdf
Document id : test
Description : Description Test

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM