[NTG-context] digitally sign fields with MuPDF-GL

2023-07-13 Thread Pablo Rodriguez
Dear list,

having the following sample code:

  \setuppapersize[A4, landscape]
  \setuplayout[page]
  \setupinteraction[state=start]
  \starttext
  \setupfield[sl][horizontal]
[frame=off, width=\textwidth, height=\textheight]
  \definefield[x][signature][sl]
  \field[x]

I also attach a sample certificate with password ABCabc.

The binaries for Windows provided by Artifex do not provide SSL support.
I’m on Linux myself, and something like MSYS2 provides binaries with
support for Linux (https://packages.msys2.org/base/mingw-w64-mupdf). I
wonder whether Homebrew provides mupdf-gl (I cannot say from
https://formulae.brew.sh/formula/mupdf).

If I try to sign the output PDF with the previous password, using
mupdf-gl or "mutool sign" (version 1.2.2), the signature annotation is
only viewed by MuPDF, MuPDF-GL and SumatraPDF.

On Linux, neither Evince or xpdf can display the signature annotation.

On Windows, Acrobat Reader DC doesn’t display the signature annotation,
nor it shows any info about the document being signed (BTW, I used
another certificate for this).

If I open the unsigned document with Acrobat Reader DC and save it, then
mupdf-gl can sign the saved document that Acrobat can handle (both
annotation and signature info) and Evince and xpdf can display the
signature.

I guess what might be causing this issue and I’m investigating it.

But it would really help, if someone can confirm the issue with MuPDF-GL
(or "mutool sign") and Acrobat (Reader or not).

Many thanks for your help,

Pablo


mycert.pfx
Description: application/pkcs12
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: access image properties in Lua

2023-07-13 Thread Hans Hagen

On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote:
What’s the current approved way to get image properties within a Lua 
function?


very old:
local pic = figures.getinfo(figures.current().status.fullname)

used to work in 2019:
local pic = img.scan{filename = figures.current().status.fullname}

if I understand this right, "img" isn’t valid anymore:
"""
token call, execute: grph-imagelib.lua:37: attempt to index a nil value 
(global 'img')

"""

I’d like to know the pixel size and if possible also the scaled target 
size of an image; either the "current" one or by name.

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").used)}

\ctxlua{inspect(figures.getinfo("t:/sources/mill.png").status)}

etc .. no more faking the img lib

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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