ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Reviczky, Adam" <adam.reviczky@kcl.ac.uk>
Subject: Re: Widget and mandatory Rect field?
Date: Mon, 18 Apr 2011 10:35:59 +0200	[thread overview]
Message-ID: <4DABF7EF.1010200@wxs.nl> (raw)
In-Reply-To: <7B4626C28B06A7418E938BF73D6DEE18F9F571EABB@KCL-MAIL05.kclad.ds.kcl.ac.uk>

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
___________________________________________________________________________________


  reply	other threads:[~2011-04-18  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18  5:31 Reviczky, Adam
2011-04-18  8:35 ` Hans Hagen [this message]
2011-04-18  9:02   ` Reviczky, Adam

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=4DABF7EF.1010200@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=adam.reviczky@kcl.ac.uk \
    --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).