View Issue Details

IDProjectCategoryView StatusLast Update
0001016contextbug reportpublic2019-11-12 17:15
Reporterflying sheep Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Summary0001016: Viewer layers are not being closed
DescriptionWhen I compile the following document, the “view” layer seems to gobble up the rest of the document: Hiding it makes “More text” vanish.

Apart from this bug, a question: Will [state=stop,printable=yes] add /Usage/Print and [state=start,printable=no] add /Usage/View to the OCG?
If not, what options to specify to make only one of the viewer layers display depending on media?

Bug exists in TeXlive 2019.52575. MRE:

\nopdfcompression
\defineviewerlayer[print][state=stop,printable=yes]
\defineviewerlayer[view][state=start,printable=no]

\def\viewcolor#1#2{%
    \startviewerlayer[view]\color[0000001]{0000002}\stopviewerlayer%
    \startviewerlayer[print]\llap{0000002}\stopviewerlayer%
}

\starttext
Hi!

\viewcolor{red}{This is only red on screen}.

More text.
\stoptext
TagsNo tags attached.

Activities

flying sheep

2019-11-12 12:31

reporter   ~0001723

OK lol of course I didn’t intend to link bugs 1 and 2 above, but to refer to arguments 1 and 2 of \viewcolor.

flying sheep

2019-11-12 17:15

reporter  

viewer-layer-bug.pdf (10,478 bytes)
viewer-layer-bug.ctx (361 bytes)   
\nopdfcompression

\defineviewerlayer[print][state=stop,printable=yes]
\defineviewerlayer[view][state=start,printable=no]

\def\viewcolor#1#2{%
    \startviewerlayer[view]\color[#1]{#2}\stopviewerlayer%
    \startviewerlayer[print]\llap{#2}\stopviewerlayer%
}

\starttext
Hi!

\viewcolor{red}{This is only red on screen}.

More text.
\stoptext
viewer-layer-bug.ctx (361 bytes)   

Issue History

Date Modified Username Field Change
2019-11-12 12:28 flying sheep New Issue
2019-11-12 12:31 flying sheep Note Added: 0001723
2019-11-12 17:15 flying sheep File Added: viewer-layer-bug.pdf
2019-11-12 17:15 flying sheep File Added: viewer-layer-bug.ctx