ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue with signature fields in Acrobat
@ 2021-08-03 16:37 Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; only message in thread
From: Pablo Rodriguez via ntg-context @ 2021-08-03 16:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez

Hi Hans,

I have the following sample:

  \setupinteraction[state=start]
  \starttext
  \startTEXpage[offset=2em]
  \setupfield[ShortLine][horizontal][width=5cm,height=5em]
  \definefield [Email] [signature] [ShortLine]
  \field [Email] [your email]
  \stopTEXpage
  \stoptext

If I sign it with Acrobat Reader, Times New Roman is used instead of
MyriadPro (which is the default font used by Acrobat for signing).

Line 945 from lpdf-fld.lmt contains:

  if #collected > 0 then
      local acroform = pdfdictionary {
          NeedAppearances = pdfmajorversion() == 1 or nil,
          Fields          = pdfreference(pdfflushobject(collected)),
          CO              = fieldsetlist(calculationset),
      }
      if sometext or somefont then
          checkpdfdocencoding()
          if sometext then
              usedfonts.tttf = fontnames.tt.tf
              acroform.DA = "/tttf 12 Tf 0 g"
          end
          acroform.DR = pdfdictionary {
              Font     = registerfonts(),
              Encoding = pdfdocencodingcapsule,
          }
      end
      lpdf.addtocatalog("AcroForm",pdfreference(pdfflushobject(acroform)))
  end

Would it be possible that the second conditional ("if sometext or
somefont") could be only applied if Fields doesn’t refer to signatures?

Otherwise, Acrobat will use the font specified in the dictionary. Among
other things, this breaks PDF/A documents, since the font for the
signature isn’t embedded.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-03 16:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 16:37 issue with signature fields in Acrobat Pablo Rodriguez via ntg-context

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