Extract / modify PDF metadata (using pdftk)

PDFTK is a free, open source PDF toolkit. It is one of my preferred tools to deal with pdf metadata. It runs in Windows and Linux platforms.

For instance, you can read the pdf metadata:

$ pdftk original.pdf dump_data output data.txt
$ cat data.txt
InfoKey: Creator
InfoValue: Writer�
InfoKey: Producer
InfoValue: OpenOffice.org 3.1�
InfoKey: CreationDate
InfoValue: D:20090923135542+02'00'
PdfID0: e5d831c33f77ac694b32456732f2c86
PdfID1: e5d831c33f77ac694b32456732f2c86
NumberOfPages: 1

And you can also modify the pdf metadata:

$ pdftk original.pdf update_info data.txt output resultado.pdf

Note the data.txt must be in a correct format!

Related posts:

  1. pdftk: tildes y caracteres especiales en metadatos de pdf
  2. Install pdftk from sources in Linux RedHat
  3. How to modify the output of oai_dc (Dublin core for OAI)

3 Responses to “Extract / modify PDF metadata (using pdftk)”

  • Tilo Ermlich says:

    Hi Miguel,

    you can also use pdfinfo from the Xpdf suite (http://www.foolabs.com/xpdf, Windows & Linux), it’s great:

    >> pdfinfo document.pdf
    Producer: Apache FOP Version 0.95
    CreationDate: 12/01/11 09:25:58
    Tagged: no
    Form: none
    Pages: 1
    Encrypted: no
    Page size: 595 x 842 pts (A4)
    File size: 101522 bytes
    Optimized: no
    PDF version: 1.4

    greetings from hamburg

Leave a Reply

Paypal donate

Please help me keep this blog up by donating.

Por favor, ayúdame a continuar con el blog donando.