ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue with annotation flags
@ 2017-05-25 16:24 Pablo Rodriguez
  2017-05-27 16:38 ` Pablo Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Rodriguez @ 2017-05-25 16:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following code:

    \setupinteraction[state=start, color=]
    \enabledirectives[references.border]
    \starttext
    \startTEXpage[offset=1em]
    \useURL[url1][http://some-url.com]\from[url1]
    \stopTEXpage
    \stoptext

The annotation code in the PDF file reads:

    << /Subtype /Link
           /A 7 0 R /Rect [12.354 10.896 131.607 25.324]
           /C [0.6 0.6 0.6]
           /F 4
           /Border [0 0 0.5]>>

I need to report a bug in a PDF viewer with printing the annotation (in
this case, it is only border).

The code that generates the annotation is (with some removals):

    local plus = { -- /F
        Invisible         = 2^0, --   1
        Hidden            = 2^1, --   2
        Print             = 2^2, --   3
        NoZoom            = 2^3, --   4
        NoRotate          = 2^4, --   5
        NoView            = 2^5, --   6
        ReadOnly          = 2^6, --   7
        Locked            = 2^7, --   8
        ToggleNoView      = 2^8, --   9
        LockedContents    = 2^9, --  10,
    }

I assume that /F is set to NoZoom in the sample above (bit position 4).
Acrobat displays the annotation flag set to NoZom.

The developers assume that 4 is actually the decimal conversion for a
binary number (100, actually bit position 3). So it prints the
annotation border in the sample above.

It took me a while to understand this (math is all Greek to me).

Is there a way that I can set the annotation flag in the sample above to
Print (/F 3)? (This would be unambiguous, since only a bit can be set
[11 would be an invalid flag value].)

Or am I missing something and Acrobat is misbehaving?

Sorry for such a weird request, but bug reporting has become extremely
complex these days ;-).

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] 2+ messages in thread

* Re: issue with annotation flags
  2017-05-25 16:24 issue with annotation flags Pablo Rodriguez
@ 2017-05-27 16:38 ` Pablo Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Rodriguez @ 2017-05-27 16:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/25/2017 06:24 PM, Pablo Rodriguez wrote:
> [...] 
> Is there a way that I can set the annotation flag in the sample above to
> Print (/F 3)? (This would be unambiguous, since only a bit can be set
> [11 would be an invalid flag value].)
> 
> Or am I missing something and Acrobat is misbehaving?

Sorry for the confusion. I was assuming that the value of the annotation
flag was the bit position and not the decimal value of the binary integer.

/F 4 (which is binary 100) is explicitly setting the annotation to be
printed.

Acrobat doesn’t print it by default. I had to remember that this is only
only because Acrobat doesn’t print any annotation by default.

Sorry for the noise,

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] 2+ messages in thread

end of thread, other threads:[~2017-05-27 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 16:24 issue with annotation flags Pablo Rodriguez
2017-05-27 16:38 ` Pablo Rodriguez

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