Package: pdftk
Version: 2.02-2
Severity: normal

Dear Maintainer,

In wheezy it was possible to use pdftk to alter the meta-data of a PDF
file.  This functionality broke in jessie.  Now there are warnings
which actually have the effect of errors (because no action is taken).

The warnings look like this:

  pdftk Warning: InfoKey: (Title) already loaded when reading new InfoKey: 
(Author) -- skipping newer item
  pdftk Warning: InfoValue: (Bug Demonstration) already loaded when reading new 
InfoValue: (Bug Submitter) -- skipping newer item
  pdftk Warning: InfoKey: (Title) already loaded when reading new InfoKey: 
(Subject) -- skipping newer item
  pdftk Warning: InfoValue: (Bug Demonstration) already loaded when reading new 
InfoValue: (Demo of how to alter PDF metadata in wheezy (broken in jessie)) -- 
skipping newer item

This script demonstrates the problem:

====8<----------------------------------------------------------------------
#!/bin/bash

# This script demonstrates how to alter the metadata of a PDF.  It's a
# self-contained example requiring no input files - only tools.  These
# are the steps:
#
#   1) auto-generate a PDF file with some dummy text
#   2) update the metadata using pdftk
#
# Tools required:
#
#   * LaTeX
#   * pdftk
#   * pdfinfo (optional)
#   * evince (optional)

################################################################################
#   1) auto-generate a PDF file with some dummy text
################################################################################

latex_fn="$(tempfile -p doc_ -s .tex)"

printf %s >"$latex_fn" \
'\documentclass{minimal}
\usepackage[a4paper,margin=1cm,nofoot,nohead]{geometry}
\usepackage{lipsum}

\begin{document}
\lipsum[1-4]
\end{document}
'
pushd "${latex_fn%/*}"
pdflatex "$latex_fn"
popd

orig_pdf_fn="${latex_fn%.tex}".pdf
new_pdf_fn="${orig_pdf_fn/.pdf/_md.pdf}"
mdata_fn="${new_pdf_fn/.pdf/.txt}"

evince "$orig_pdf_fn"& #just to demonstrate that the input file generated okay

################################################################################
#   2) update the metadata using pdftk
################################################################################

cat > "$mdata_fn" <<EOF
InfoKey: Title
InfoValue: Bug Demonstration
InfoKey: Author
InfoValue: Bug Submitter
InfoKey: Subject
InfoValue: Demo of how to alter PDF metadata in wheezy (broken in jessie)
InfoKey: Keywords
InfoValue: bug report
InfoKey: CreationDate
InfoValue: $(date +%F)
EOF

# This will cause warnings in version 2.02
pdftk "$orig_pdf_fn" update_info "$mdata_fn" output "$new_pdf_fn"

# Both of these commands will show that the metadata update failed in version 
2.02
pdftk "$new_pdf_fn" dump_data
pdfinfo "$new_pdf_fn"
====8<----------------------------------------------------------------------


-- System Information:
Debian Release: 8.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pdftk depends on:
ii  libc6       2.19-18
ii  libgcc1     1:4.9.2-10
ii  libgcj15    4.9.2-10
ii  libstdc++6  4.9.2-10

pdftk recommends no packages.

Versions of packages pdftk suggests:
ii  poppler-utils [xpdf-utils]  0.26.5-2

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to