Your message dated Fri, 09 Oct 2009 22:27:35 +0000
with message-id <[email protected]>
and subject line Bug#511415: fixed in pdftk 1.41+dfsg-3
has caused the Debian Bug report #511415,
regarding support stamping pages differently in one run
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
511415: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511415
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pdftk
Version: 1.41-3
Severity: wishlist
It would be nice if pdftk would allow to overlay different pages at the
same time, like a stamp but not limited to only one page.
Attached patch for example adds an multistamp command, so that different
pages are stamped with different pages. This is for example very nice
to add page numbers or other "corrections" on top of an existing
document. (getting the different pages out and stamping those and
concatenating everything back is both more complex and generates much
bigger files).
Hochachtungsvoll,
Bernhard R. Link
diff -r -u pdftk-1.41.old/pdftk/pdftk.cc pdftk-1.41/pdftk/pdftk.cc
--- pdftk-1.41.old/pdftk/pdftk.cc 2006-11-28 23:51:36.000000000 +0100
+++ pdftk-1.41/pdftk/pdftk.cc 2009-01-10 16:46:50.000000000 +0100
@@ -392,6 +392,12 @@
// (and preserving old behavior for backwards compatibility)
return background_k;
}
+ else if( strcmp( ss_copy, "multibackground" )== 0 ) {
+ return multibackground_k;
+ }
+ else if( strcmp( ss_copy, "multistamp" )== 0 ) {
+ return multistamp_k;
+ }
else if( strcmp( ss_copy, "stamp" )== 0 ) {
return stamp_k;
}
@@ -945,10 +951,20 @@
m_operation= filter_k;
arg_state= background_filename_e;
}
+ else if( arg_keyword== multibackground_k ) {
+ m_operation= filter_k;
+ m_multibackground_b = true;
+ arg_state= background_filename_e;
+ }
else if( arg_keyword== stamp_k ) {
m_operation= filter_k;
arg_state= stamp_filename_e;
}
+ else if( arg_keyword== multistamp_k ) {
+ m_operation= filter_k;
+ m_multistamp_b = true;
+ arg_state= stamp_filename_e;
+ }
else if( arg_keyword== output_k ) { // we reached the output section
arg_state= output_filename_e;
}
@@ -2285,10 +2301,12 @@
// try opening the PDF background or stamp before we get too involved
itext::PdfReader* mark_p= 0;
+ bool mark_per_page_b = false;
bool background_b= true; // set false for stamp
com::lowagie::text::pdf::PdfImportedPage* mark_page_p= 0;
//
if( !m_background_filename.empty() ) {
+ mark_per_page_b = m_multibackground_b;
if( m_background_filename== "PROMPT" ) {
prompt_for_filename( "Please enter a filename for the background PDF:",
m_background_filename );
@@ -2306,6 +2324,7 @@
}
}
else if( !m_stamp_filename.empty() ) { // stamp
+ mark_per_page_b = m_multistamp_b;
background_b= false;
if( m_stamp_filename== "PROMPT" ) {
prompt_for_filename( "Please enter a filename for the stamp PDF:",
@@ -2470,15 +2489,19 @@
// create a PdfTemplate from the first page of mark
// (PdfImportedPage is derived from PdfTemplate)
- com::lowagie::text::pdf::PdfImportedPage* mark_page_p=
- writer_p->getImportedPage( mark_p, 1 );
+ com::lowagie::text::pdf::PdfImportedPage* mark_page_p;
+ if( !mark_per_page_b )
+ mark_page_p = writer_p->getImportedPage( mark_p, 1 );
// iterate over document's pages, adding mark_page as
// a layer 'underneath' the page content; scale mark_page
// and move it so it fits within the document's page;
jint num_pages= input_reader_p->getNumberOfPages();
+ jint mark_num_pages= mark_p->getNumberOfPages();
for( jint ii= 0; ii< num_pages; ) {
++ii;
+ if( mark_per_page_b && ( ii == 1 || ii <= mark_num_pages ) )
+ mark_page_p = writer_p->getImportedPage( mark_p, ii );
com::lowagie::text::Rectangle* doc_page_size_p=
input_reader_p->getCropBox( ii );
jint doc_page_rotation= input_reader_p->getPageRotation( ii );
diff -r -u pdftk-1.41.old/pdftk/pdftk.h pdftk-1.41/pdftk/pdftk.h
--- pdftk-1.41.old/pdftk/pdftk.h 2006-09-14 23:07:06.000000000 +0200
+++ pdftk-1.41/pdftk/pdftk.h 2009-01-10 16:39:55.000000000 +0100
@@ -83,7 +83,9 @@
update_info_k,
update_xmp_k,
background_k, // promoted from output option to operation in pdftk 1.10
+ multibackground_k,
stamp_k,
+ multistamp_k,
// optional attach_file argument
attach_file_to_page_k,
@@ -161,6 +163,8 @@
string m_output_owner_pw;
string m_output_user_pw;
jint m_output_user_perms;
+ bool m_multistamp_b;
+ bool m_multibackground_b;
bool m_output_uncompress_b;
bool m_output_compress_b;
bool m_output_flatten_b;
--- End Message ---
--- Begin Message ---
Source: pdftk
Source-Version: 1.41+dfsg-3
We believe that the bug you reported is fixed in the latest version of
pdftk, which is due to be installed in the Debian FTP archive:
pdftk_1.41+dfsg-3.diff.gz
to pool/main/p/pdftk/pdftk_1.41+dfsg-3.diff.gz
pdftk_1.41+dfsg-3.dsc
to pool/main/p/pdftk/pdftk_1.41+dfsg-3.dsc
pdftk_1.41+dfsg-3_amd64.deb
to pool/main/p/pdftk/pdftk_1.41+dfsg-3_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Johann Felix Soden <[email protected]> (supplier of updated pdftk package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Fri, 09 Oct 2009 22:48:13 +0200
Source: pdftk
Binary: pdftk
Architecture: source amd64
Version: 1.41+dfsg-3
Distribution: unstable
Urgency: low
Maintainer: Johann Felix Soden <[email protected]>
Changed-By: Johann Felix Soden <[email protected]>
Description:
pdftk - tool for manipulating PDF documents
Closes: 511415 550367
Changes:
pdftk (1.41+dfsg-3) unstable; urgency=low
.
* Add multistamp and multibackground support (Closes: #511415)
- thanks to Bernhard R. Link <[email protected]> for the patch.
* Extend uncompression: Don't fail when for libitext unknown filters
occur. (Closes: #550367)
Checksums-Sha1:
ddcdba8fe5d69f2f9dda6d945631399ba40ab05a 1228 pdftk_1.41+dfsg-3.dsc
70d525462a85d0edb2c04232cea3f8666a16463d 26500 pdftk_1.41+dfsg-3.diff.gz
35fe74de01be36d78b0aab01d680c5081d90b81e 87596 pdftk_1.41+dfsg-3_amd64.deb
Checksums-Sha256:
60b70a185e6373715c2f6a776a5c3b3bff436248e635d69b68d15ea4a9941ae7 1228
pdftk_1.41+dfsg-3.dsc
03cc801575471ab308285af9216c7b5ddb5cfcffe982333129ba2836097592b1 26500
pdftk_1.41+dfsg-3.diff.gz
3e72e60aec146f5b5ffe8a20dc04119e96f1b4988355c46342aad81e61bb736d 87596
pdftk_1.41+dfsg-3_amd64.deb
Files:
4f225950ae63e9f34c89a6c376dff35e 1228 text optional pdftk_1.41+dfsg-3.dsc
acd0144fad73e644d71ee3a4823dc5db 26500 text optional pdftk_1.41+dfsg-3.diff.gz
e3067d4917aa3e2f79ad629818d0a5dd 87596 text optional
pdftk_1.41+dfsg-3_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkrPrwMACgkQ1gXdnL6dUznukwCeKBBcwdIVWetGhX9Y+H9O3KhH
utwAoJOkduzZ0glvZ4AbviRgsqETy79X
=VWeG
-----END PGP SIGNATURE-----
--- End Message ---