pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Crypt filter issue


From: jemarch
Subject: Re: [pdf-devel] Crypt filter issue
Date: Mon, 24 Nov 2008 21:58:58 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi David.

   I am writing crypt filter and it arises a doubt related to
   gnupdf's design. According to PDF Reference, encrpytion is defined
   (mostly) by a global dictionary. This dictionary holds a list of crypt
   filters will
   be used in the rest of the document.

   I suppose crypt filter module will receive parameters from its filter
   dictionary. However, it is not enought, it is even optional. We must
   consider global data, I think. Nevertheless these parameters will be
   known by upper layers.

There is not a 1-1 relationship between any PDF filter and a stm
filter, although it is common. Regardless the origin of the data we
should identify the needed stm filters that will allow us to implement
the processing of the higher-level PDF filters.

An example is the JBIG2 decoder. To describe several "images"
(XObjects) a PDF file can use the following streams:

A stream containing global segments to use with all the images:

10 0 obj
<< /Filter ASCIIHexDecode >>
stream
...
endstream
endobj

and several streams defining the images:

20 0 obj
<< /Filter [/ASCIIHexDecode /JBIG2Decode]
   /DecodeParms [null << /JBIG2Globals 10 0 R >>] >>
stream
...
endstream
endobj

30 0 obj
<< /Filter [/ASCIIHexDecode /JBIG2Decode]
   /DecodeParms [null << /JBIG2Globals 10 0 R >>] >>
stream
...
endstream
endobj

We would use only two stm filters to get the decoded JBIG2 data: one
stm filter per image, using as a parameter for the filters the
contents of the "10 0 R" PDF stream.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]