[NTG-context] Re: externalfigure crashed

2023-12-04 Thread Hans Hagen via ntg-context

On 12/4/2023 5:38 PM, Pablo Rodriguez via ntg-context wrote:

On 11/24/23 18:16, Hans Hagen via ntg-context wrote:

[…]
will do for now ... i can't upload a new installer .. pending the built;
the advantage is that i can do some experiments that would otherwise
break the current version (making compact font mode very close to
normal, pdf signing […]


Sorry, Hans, if I am missing the point.

Does the above mean that ConTeXt will be able to sign PDF documents with
digital certificates?
Well, that's what singing is, right? The problem is actually less in the 
signing than in the certificates themselves.


Basically one can sign (with some certificate) and then validate.


% sign-001.tex

\setupinteraction[state=start]

\definefield[signature][signed]

\defineoverlay[signature][my signature]

\starttext
\startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
sign: \inframed
  [background=signature,framecolor=darkred]
  {\fieldbody[signature][width=3cm,option=hidden]}
\stopTEXpage
\stoptext

after neing processed:

mtxrun --script pdf --sign --certificate=sign-001.pem --password=test 
sign-001 (--library)


and:

mtxrun --script pdf --validate --certificate=sign-001.pem 
--password=test sign-001 (--library)


etc. works here.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] animation error

2011-09-06 Thread Wolfgang Schuster

Am 06.09.2011 um 16:52 schrieb dalyoung:

 Dear Wolfgang,
 
 In the recent beta, \startanimation \stopanimation is not working.
 There is a undefined control sequence error at \stopanimation.
 
 In the version 2011/08/10, it works fine.
 
 Is there anything changed in the recent version?


There had been changes in the parameter handler for mkiv.

scrn-fld.mkvi:

\def\scrn_fieldstack_add#tag#settings#symbol%
  {\advance\scratchcounter\plusone
   \edef\currentfieldstackname{#tag:\number\scratchcounter}%
-  \ifnum\scratchcounter=\@@fdstart\relax
+  \ifnum\scratchcounter=\fieldcategoryparameter\c!start\relax
 
\definefieldbody[\currentfieldstackname][\c!type=check,\c!values={#symbol,\empty},\c!default={#symbol}]%
   \else
 
\definefieldbody[\currentfieldstackname][\c!type=check,\c!values={#symbol,\empty},\c!default=]%
   \fi
   \setbox\scrn_fieldstack_box\hbox{\symbol[#symbol]}%
   \setcollector
 [fieldstack]
 {\fieldbody
[\currentfieldstackname]
[\c!option=\v!readonly,
 \c!width=\wd\scrn_fieldstack_box,
 \c!height=\ht\scrn_fieldstack_box,
 \c!depth=\dp\scrn_fieldstack_box,
 #settings]}}

Wolfgang
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Widget and mandatory Rect field?

2011-04-18 Thread Hans Hagen

On 18-4-2011 7:31, Reviczky, Adam wrote:

Hi

I have a PDF with widgets and everything's fine with it, and I'm testing it by 
opening it with Adobe Reader.

Now I had a look again with other viewers and when I open it with evince 
(poppler based), then it gives me some strange errors like this:
Error: Annotation rectangle is wrong type
Though it opens it fine and no problems at all.


there can also be a puzzling

FormFieldButton::setState called on a readOnly field


I googled a bit and found a bug report on this:
https://bugs.freedesktop.org/show_bug.cgi?id=29954

There it is said that its ConTeXt's fault, as It has a Widget annotation without 
the mandatory Rect field.
Is it really so? I couldn't find any threads on this on the list.


\nopdfcompression

\setupinteraction[state=start]

\definefieldbody[email][type=line]

\starttext
\startTEXpage
\fieldbody[email]
\par
\fieldbody[email]
\stopTEXpage
\stoptext

gives

17 0 obj

/Type /Annot
/Q 0 /Subtype /Widget /Parent 16 0 R /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 
0 rg 0 0 0 RG) /MK  /CA ()  /F 4

/Rect [0 14.4275 59.7758 26.3827]

endobj
18 0 obj

/Type /Annot
/Q 0 /Subtype /Widget /Parent 16 0 R /DA (/rmtf 11.9552 Tf 1.1955 Ts 0 0 
0 rg 0 0 0 RG) /MK  /CA ()  /F 4

/Rect [0 0 59.7758 11.9552]

endobj

which look like Annot's with Rect's to me. There is a parent field

16 0 obj
 /Q 0 /Subtype /Widget /T feff0065006d00610069006c /F 4 /Kids 15 0 R 
/V feff /DV feff /Ff 0 /MaxLen 1024 /FT /Tx /DA (/rmtf 11.9552 Tf 
1.1955 Ts 0 0 0 rg 0 0 0 RG) 

endobj

but it's not an annot (just a container for shared data). (Actually 
children can have different rectangles so it would not make sense to 
share one).



Can someone confirm this, can this be even fixed?


Are you saying that Evince does forms (and Javascript as it's 
associated) or is it checking something that is not interpreted anyway? 
Officially a viewer should ignore annots that it cannot handle.


Anyhow, in context we've always had such widgets implemented using a 
parent / child model and it's the child that matters for rendering (and 
it definitely has a Rect as it's an Annot) while the parent is just a 
dictionary and not an annot (one can argue that the Subtype key is not 
needed there but - at least in the past - it had to be there.)


BTW, I'm currently playing with the luatex epdf interface (under 
construction and being cleaned up for 0.70) and I noticed the same 
message. Interesting is that there are such widget tests in popler but 
at the same time more important tests (arrays getting out of bounds 
leading to crashes) are not there. But Hartmut is working on getting 
that all fixed in the luatex variant (interface) eventually. The 
mentioned message probably have to be intercepted as well and be fed 
into the regular message system.


So, unless I'm sure what (and if something) is wrong I'll do nothing. 
(Acrobat preflights the document all right and some widgets types are 
too instable to mess with too much anyway.)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Widget and mandatory Rect field?

2011-04-17 Thread Reviczky, Adam
Hi

I have a PDF with widgets and everything's fine with it, and I'm testing it by 
opening it with Adobe Reader.

Now I had a look again with other viewers and when I open it with evince 
(poppler based), then it gives me some strange errors like this:
Error: Annotation rectangle is wrong type
Though it opens it fine and no problems at all.

I googled a bit and found a bug report on this:
https://bugs.freedesktop.org/show_bug.cgi?id=29954

There it is said that its ConTeXt's fault, as It has a Widget annotation 
without the mandatory Rect field.
Is it really so? I couldn't find any threads on this on the list.

Can someone confirm this, can this be even fixed?

Adam


PS: As there's an attached PDF on the bug report, but with mkii, I'm attaching 
a minimal mkiv PDF (widget.pdf), if that helps.

made with:
%%%
\setupinteraction[state=start]
\setuppagenumbering[location=]
\starttext
\definefieldbody[email][type=line]
\fieldbody[email]
\stoptext
%%%


widget.pdf
Description: widget.pdf
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___