[pdftex] pdftex-pdfcrypt update

Hans Hagen pragma at wxs.nl
Tue Mar 27 17:01:20 CEST 2001


At 03:27 PM 3/27/01 +0200, Ricardo Sanchez Carmenes wrote:

>> I think that looking at the other pdftex primitives 
>>   
>>   \pdfcrypt 
>>      owner {...} 
>>      user {...} 
>>      noprint 
>>      noedit 
>
>Maybe you are right. I'll study the case.
>However, pdftex has also some primitives with the form
>\pdfprimitive{ this and that }

yes, but the things between { } are either processed by tex or passed onto
pdf directly, there is never a key/value syntax in there let alone the ""
as delimiters [which will make german users crazy since they are often made
into an active char there]. 

>Could you or anybody else provide pros and cons for each syntax ?

this key {} syntax conforms the annot and image inclusion syntax

>> would be better, or maybe the latter keywords should be replaced by access
>> to the pdf dicts involved (i will look into that when i can test it).
>
>No. The PDF encryption dictionary is not suitable for direct use.
>It has the form:
>
><<
>/Filter /Standard
>/V 1
>/R 2
>/O <owner pw as a 32-byte key represented in hexadecimal>
>/U < user pw as a 32-byte key represented in hexadecimal>
>/P two-byte integer that controls permits
>   with bits 1-2=0, 7-32=1, 3=print, 4=edit, 5=copy, 6=annotations
>>>
>
>/Filter /Standard /V 1 /R 2 are fixed, unless you use a custom-made
>encryption filter. The /O and /U 32-byte keys are calculated from the
>provided passwords and the "unique" file ID stored added to the trailer:
>/ID [<16-byte id1><1-6byte id2>], therefore unsuitable for direct human
>consum.

Hm. If i read this all right, it would match the rest of pdftex's syntax to
have a 

  attr {} 

so that one should say [as happens with for instance widgets]

  attr {/P 1256} 

depending on the protection needed. During the developmen tof pdftex, thanh
has made sure that anything that shoul dnot necessarily be hard coded, was
not coded at all and passed by the user (or macro package). That way pdftex
can keep up with developments without the need to adapt the source.

Hans    
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma at wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------




More information about the pdftex mailing list