I'm trying to stamp one PDF file (multiple pages) with another (single page) PDF file by using pdftk
stamp operation.
pdftk large.pdf stamp stamp.pdf output stamped.pdf
Now, stamp.pdf
contains a single page with a single line of text at the bottom of the page. That text is a hyperlink (that is, a pdfmark link annotation is located above that line of text). Newly created stamped.pdf
is properly stamped but hyperlink is not present anymore - it seems that stamp
operation (and multistamp
, and also background
and multibackground
operations) is, for some reason (?), stripping this hyperlink annotation.
Does anyone know how to circumvent this?
I've tried this on multiple distros and results are the same (Debian 6.0, Ubuntu 12.04, CentOS 6.4 - pdftk
versions 1.44 and 1.41).
Please note that hyperlinks in large.pdf
are preserved in output stamped.pdf
.
Solution like converting large.pdf
to PS and then adding links to each page in PS and then converting back to PDF is not an option as that takes a really long time compared to pdftk
stamping (in my case it takes something like 10-20 seconds - depending on large.pdf
size, while pdftk
completes stamping in 1 second).
I'm also interested in any other Linux command-line based tool for stamping one PDF with another PDF (or PS).
Thanks.
EDIT
I tested with latest version of pdftk (2.02) and the results are the same - links are stripped.
I tested stamping functionality with some other (non-free) tools as well - Coherent PDF and VeryPDF - both are stripping links. So, I guess it's either something that is overlooked or there is some technical difficulty in maintaining hyperlink annotations in stamping PDF.