Tux

...making Linux just a little more fun!

Talkback:180/grebler.html

Neil Youngman [ny at youngman.org.uk]


Tue, 2 Nov 2010 15:02:41 +0000

Some time ago I came across PDFTK, but I've never really had a use for it. it sounds as though it should do what you need, but a quick scan of the man page doesn't tell me whether it honours restrictions in the PDF.

https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

Neil Youngman


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Tue, 2 Nov 2010 12:32:18 -0400

On Tue, Nov 02, 2010 at 03:02:41PM +0000, Neil Youngman wrote:

> Some time ago I came across PDFTK, but I've never really had a use for it. it 
> sounds as though it should do what you need, but a quick scan of the man page 
> doesn't tell me whether it honours restrictions in the PDF.
> 
> https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

It does:

ben at Jotunheim:/tmp$ pdfinfo restricted.pdf 
Title:          restricted-test.rtf
Author:         Cnl
Creator:        ADOBEPS4.DRV Version 4.50
Producer:       Acrobat Distiller 5.0
CreationDate:   Fri Jul 19 02:11:24 2002
ModDate:        Thu Jul 18 19:12:43 2002
Tagged:         no
Pages:          8
Encrypted:      yes (print:no copy:no change:no addNotes:no)
Page size:      612 x 792 pts (letter)
File size:      49879 bytes
Optimized:      yes
PDF version:    1.4
ben at Jotunheim:/tmp$ pdftk restricted.pdf cat 3-4 output pages3-4.pdf
Error: Failed to open PDF file: 
   restricted.pdf
   OWNER PASSWORD REQUIRED, but not given (or incorrect)
Errors encountered.  No output created.
Done.  Input errors, so no output created.

However, as I'd mentioned in the editorial note, there are several trivial ways to remove that "protection", and these have been available for years - after which, pdftk will do literally anything you can think of to the content. The "protection" is a rather silly toy, and I'm not sure what use it was supposed to be (although the "copy" protection isn't quite as silly as it sounds - I think it means "don't allow selecting the text to be pasted elsewhere". In any case, both evince and xpdf ignore it.)

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * https://LinuxGazette.NET *


Top    Back