Metadata in PDF Files

荒凉一梦 提交于 2019-12-24 03:02:42

问题


I want to be able to store some plugin-specific data in a PDF so that I can read it back when that PDF is loaded back, without this metadata being visible to the user.

How can I put this metadata into the PDF File?


回答1:


PDF supports XMP metadata. You should append your plug-in specific information as a payload in the XMP portion.




回答2:


Depending on how you are generating and reading your PDFs you can use pdftk to edit your metadata. You can add an invisable tag to the PDF by adding it as a metadata property with a key and value by using pdftk dump_data to write all metadata to a text file, then append the new key and value to the text file, then use pdftk update_info to put back all the metadata, including the new key value pair.




回答3:


The easiest way to do that is simply append the information as text to the end of the pdf file.



来源:https://stackoverflow.com/questions/757192/metadata-in-pdf-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!