PDF files : printing protected !

Michael Still mikal at stillhq.com
Wed May 4 23:36:04 UTC 2005


Vincent Trouilliez wrote:

[snip]

> I remember someone on this list recently, who seemed very knowledgeable
> about the PDF and PS file format. How is this printing protection
> implemented ?

Ok. The longish answer... A PDF document is basically pain text (we'll
ignore exceptions for now). The format of that document is something
along the lines of:

<header>
<objects>
<xref>
<trailer>

Where the objects form a tree which describes the content of the
document. Each of these objects can have a dictionary, and these
dictionaries are composed of (key, value) pairs.

One of these dictionaries is the access permissions storage. Whether the
document can be printed is packed into a integer within this dictionary.
Checkout page 97 of the PDF Specification version 1.5 for more details.

> Is just a couple bytes in the header of the file that could be
> overwritten with a HEX editor, provided we know the exact
> address/offset ?

Because of the way the object tree is defined, there is no exact offset
which will have the right value to change. PDF is a much more complex
format than traditional things like TIFF which have fixed binary
headers. In fact, parsing PDF files is an interesting problem to try to
solve, which is why there is very little open source code which does it
well.

> Or is there some PDF editor or utility I could use to remove this
> protection ?

Not that I am aware of.

> I never knew PDF's had protection mechanisms ! :-/

They always have had these features. I guess that the issue here is that
the copyright holder doesn't want you to be able to print their property.

Mikal

-- 

Michael Still (mikal at stillhq.com) | "The geek shall inherit
http://www.stillhq.com            |  the earth"
UTC + 10                          |    -- The Simpsons




More information about the ubuntu-users mailing list