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 ----------------------------------------------------------------------