4

I have some PDF files, on pdf version 1.6.

i have been trying the following libraries to edit the metadata of these pdf files:

  1. Zend_Pdf class: which worked nicely for pdf version 1.5 or less. but had an error on parsing pdf of version 1.6
  2. pdflib: not sure how i can edit an existing pdf file.
  3. tcpdf: same problem that i couldn't find the functions for editing the existing pdf
  4. someone also suggested just edit the pdf file by adding the following(for an example, title) to the end of the pdf file: /Title (Title Text)

i would still wish to be able to do it using pdflib or some free source php libraries to achieve this.

4

1 回答 1

3

PDFlib 无法编辑现有文件,但您可以将现有文件的内容复制到新文件并从导入文档中读取元数据,对其进行更改,然后将其写入新文档。

http://www.pdflib.com/pdflib-cookbook/document-interchange/import-xmp-from-pdf/php-import-xmp-from-pdf/

是一个例子,展示了这种方法的一部分。

于 2013-10-08T17:33:39.400 回答