ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Vit Zyka <vit.zyka@seznam.cz>
Cc: pdftex@tug.org
Subject: Re: ConTeXt tool for enabling comments in PDF ?
Date: Mon, 17 Jan 2005 20:05:38 +0100	[thread overview]
Message-ID: <41EC0C82.9080201@seznam.cz> (raw)
In-Reply-To: <41DD4D9A.9080308@wxs.nl>

Hans Hagen wrote:
> Vit Zyka wrote:
> 
> interesting is that the doc opens but the menu bar freezes -)
> 
> \starttext
> 
> \startcomment should work in older readers as well \stopcomment \input 
> bryson
> 
> \pdfcompresslevel=0
> 
> \immediate\pdfobj{<< /Type /Sig /Filter /Identity /P 2 >>} 
> \edef\DocMDPobj{\the\pdflastobj\space 0 R }
> \immediate\pdfobj{<< /Type /Sig /Filter /Identity /P 2 >>} \edef\URRRobj 
> {\the\pdflastobj\space 0 R }
> 
> \pdfcatalog{/Perms << /DocMDP \DocMDPobj /UR3 \URRRobj>>}
> 
> \stoptext

A have had a second look at the Document Permitions. AFAIK and if Adobe 
does not have some bitter secret the situation is as follow:

1) if you want to permit additional document rights available in AR 6,7 
(like commenting, saving, loading  and sending form data) you need to 
sign document. (pgs. 684-700)

2) to sign document you need a) privat/public key generator and b) 
calculate document diggest (number; sum of integers from (nearly) all 
doc dictionary keys and values; alg. p. 1037).

Bellow is the document skeleton for that. There should be:
1) filled the comment lines started by %! (diggest and signature values)
2) perhaps also %? (depends on %!)
3) perhaps the FormSig field is not needed ???

So, to do that, pdfTeX should start to calc document diggest and there 
should be standard(?) process of signing this value.

Vitek Zyka

------------------------------------------------------------------
\pdfoptionpdfminorversion=6
\pdfcompresslevel=0

\def\defObj#1#2{%
   \immediate\pdfobj{#2}%
   \edef#1{\the\pdflastobj\space 0 R }%
}

%--- MDP
\defObj\objTransformParamsMDP{<<
   /Type /TransformParams /P 3 /V /1.2
 >>}

\defObj\objSigRefMDP{<<
   /Type /SigRef /TransformMethod /DocMDP
   /TransformParams \objTransformParamsMDP
%!  /DigestMethod ? /MD5 | /SHA1
%!?  /DigestValue ? ()
%!?  /DigestLocation [? ?]
 >>}

%--- UR
\defObj\objTransformParamsUR{<<
   /Type /TransformParams
   /Document [/FullSave]
   /V /2.2
   /Annots [/Create /Delete /Modify /Copy /Import /Export] % if UR3 also 
/Online /SummaryView
   /Form [/FillIn /Import /Export /SubmitStandalone /SpawnTemplate]
%  /Signature [/Modify]
   /P false
 >>}

\defObj\objSigRefUR{<<
   /Type /SigRef /TransformMethod /DocUR
   /TransformParams \objTransformParamsUR
%!  /DigestMethod ? /MD5 | /SHA1
%!?  /DigestValue ? ()
%!?  /DigestLocation [? ?]
 >>}

%--- Sig
\defObj\objSig{<<
   /Type /Sig
%!  /Filter Adobe.PPKLite | Entrust.PPKEF | CICI.SignIt | VeriSign.PPKVS
%?  /SubFilter adbe.x509.rsa_sha1 | adbe.pkcs7.detached | adbe.pkcs7.sha1
%  /Cert [] | () % only if /SubFilter adbe.x509.rsa_sha1
%  /Contents (?)
   /Reference [
%  	\objSigRefMDP
     \objSigRefUR
   ]
%  /ByteRange [0 0] % should if used UR3 then can be ommited DiggestValue
   /V 1
 >>}

%--- Perms
\defObj\objPerms{<<
   /DocMDP \objSig
   /UR \objSig
%  /UR3 \objSig
 >>}

%--- Sign Form
\defObj\objFormSigField{<<
   /FT /Sig
   /T (SigFieldName)
   /V \objSig
 >>}
\defObj\objForm{<<
  /Fields [\objFormSigField]
 >>}

\pdfcatalog{/AcroForm \objForm /Perms \objPerms}

\starttext
   \startcomment should work in older readers as well \stopcomment
   \input bryson
\stoptext
----------------------------------------------------------------------

  reply	other threads:[~2005-01-17 19:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05 10:49 Steffen Wolfrum
2005-01-05 11:03 ` Mark Smith
2005-01-05 11:17   ` Mark Smith
2005-01-05 22:15   ` Henning Hraban Ramm
2005-01-05 22:32     ` Mark Smith
2005-01-06 10:00       ` Hans Hagen
2005-01-06 10:02     ` Hans Hagen
2005-01-06 12:40       ` Henning Hraban Ramm
2005-01-06 13:24         ` Mark Smith
2005-01-05 11:35 ` Hans Hagen
2005-01-05 12:32   ` Mark Smith
2005-01-05 11:46 ` Vit Zyka
2005-01-05 15:21   ` Hans Hagen
2005-01-05 16:27     ` Vit Zyka
2005-01-05 17:44       ` Hans Hagen
2005-01-05 23:09         ` Vit Zyka
2005-01-06  9:30           ` Hans Hagen
2005-01-06 10:10             ` Vit Zyka
2005-01-06 10:44               ` Hans Hagen
2005-01-06 12:43                 ` Vit Zyka
2005-01-06 14:05                   ` Hans Hagen
2005-01-06 14:39                   ` Hans Hagen
2005-01-17 19:05                     ` Vit Zyka [this message]
2005-01-18  9:47                       ` h h extern
2005-01-20 13:58                         ` Vit Zyka
2005-05-28 11:28 Joachim Schlosser
2005-05-31  7:22 Joachim Schlosser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41EC0C82.9080201@seznam.cz \
    --to=vit.zyka@seznam.cz \
    --cc=ntg-context@ntg.nl \
    --cc=pdftex@tug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).