ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: problems with signature fields
Date: Wed, 11 Nov 2020 21:46:15 +0100	[thread overview]
Message-ID: <556bc7b1-6c1d-55f9-a42f-b1905a76bda7@gmx.es> (raw)

Hans,

I have the following sample:

  \setupinteraction[state=start]

  \starttext
  \startTEXpage[offset=1em]
       \definefield[x][signature]
       \field[x]
  \stopTEXpage
  \stoptext

I can only use Acrobat to sign PDF documents with signature fields
generated by ConTeXt. Other tools sign the PDF document not producing a
valid signature (Acrobat cannot read or validate it).

From the source, signature has two objects (copied from the sample above):

  2 0 obj
  <<
    /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
    /DV <FEFF>
    /F 4
    /FT /Sig
    /Ff 0
    /Kids 1 0 R
    /MaxLen 1024
    /Q 0
    /Subtype /Widget
    /T <FEFF0078>
    /V <FEFF>
  >>
  endobj

  4 0 obj
  <<
    /Type /Annot
    /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 0 rg 0 0 0 RG)
    /F 4
    /Parent 2 0 R
    /Q 0
    /Subtype /Widget
    /Rect [ 14.033054 14.033054 70.40415 25.08072 ]
  >>
  endobj

One of the tools that has issues with two objects for the signature
field is the latest version (1.18) from mupdf-gl.

mupdf-gl adds the signature value to the child (object 4) and not to its
parent (object 2).

I’m afraid this is also the same issue that AutoFirma (a e-signing tool
developed by the Spanish government
[https://firmaelectronica.gob.es/Home/Descargas.html]) has with these
signature fields.

When both objects are merged in one (as Acrobat Reader does when saving
a copy), both tools generate documents contaning signatures totally
unproblematic to be read validated by Acrobat.

I suggested merging both objects back in 2017. You told me that
simplifyng this would introduce too much complexity in ConTeXt only to
save some bytes.

Back then, I thought it was an minor improvement. Now I realized that
this two objects for signature fiels are only valid for Acrobat.

I wonder whether this improvement might be also easier to make in LMTX.

Would it be possible that signature fields may have only one object, so
that mupdf-gl and other tools have no problem signing fields PDF
documents generated by ConTeXt?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2020-11-11 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 20:46 Pablo Rodriguez [this message]
2020-11-11 23:24 ` Hans Hagen
2020-11-12 14:05   ` Pablo Rodriguez

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=556bc7b1-6c1d-55f9-a42f-b1905a76bda7@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /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).