From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17879 Path: main.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context,gmane.comp.tex.pdftex Subject: Re: ConTeXt tool for enabling comments in PDF ? Date: Mon, 17 Jan 2005 20:05:38 +0100 Message-ID: <41EC0C82.9080201@seznam.cz> References: <41DBD3A0.6040605@seznam.cz> <41DC060E.4080504@wxs.nl> <41DC156B.8020803@seznam.cz> <41DC2781.9010104@wxs.nl> <41DC739E.3030107@seznam.cz> <41DD0536.2070308@wxs.nl> <41DD0EB3.1060600@seznam.cz> <41DD1683.4080103@wxs.nl> <41DD3286.9020206@seznam.cz> <41DD4D9A.9080308@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1105988716 16022 80.91.229.6 (17 Jan 2005 19:05:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Jan 2005 19:05:16 +0000 (UTC) Cc: pdftex@tug.org Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 17 20:05:08 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CqcBY-0002gP-00 for ; Mon, 17 Jan 2005 20:05:08 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 55BCD1278A; Mon, 17 Jan 2005 20:05:07 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10666-02; Mon, 17 Jan 2005 20:05:04 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E7CA612772; Mon, 17 Jan 2005 20:05:04 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 568EB12772 for ; Mon, 17 Jan 2005 20:05:03 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10616-02-2 for ; Mon, 17 Jan 2005 20:05:02 +0100 (CET) Original-Received: from smtp.seznam.cz (unknown [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id 2203212771 for ; Mon, 17 Jan 2005 20:05:02 +0100 (CET) Original-Received: (qmail 12967 invoked from network); 17 Jan 2005 19:04:59 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@82.142.74.35) by smtp.seznam.cz with SMTP; 17 Jan 2005 19:04:59 -0000 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <41DD4D9A.9080308@wxs.nl> X-Antivirus: avast! (VPS 0502-3, 14.01.2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17879 gmane.comp.tex.pdftex:1871 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17879 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 ----------------------------------------------------------------------