[poppler] FreeText font/border color in DA - ISO32k vs Adobe Reader vs poppler
Tobias Deiminger
haxtibal at posteo.de
Thu Aug 23 18:53:27 UTC 2018
I'm posting here, esp. in the hope Leonard Rosenthol is reading. Adobe
Reader
behaves differently than I had expected. Want to figure out what's going
on,
because of https://gitlab.freedesktop.org/poppler/poppler/issues/50.
Questions is, how shall one adjust font color and border color of
FreeText
annotations by means of /DA? I'm asking explicitely about situations
where
there's no /AP, because poppler can't write /AP atm.
ISO 32k tells us that /DA establishes graphics state in case there's no
/AP. We
can use text operators
- g/rg/k/sc, set color for nonstroking operations
- G/RG/K/SC, set color for stroking operations
- Tr, set text rendering mode, where 0 = "fill"
Drawing border is most likely a stroking operation, while drawing text
glyphs in
fill mode is a nonstroking operation. So I had expected Adobe Reader to
take
font color from g/rg/k/sc, and to take border color from G/RG/K/SC. In
fact,
Adobe Reader does so in the /AP entry. But it doesn't interpret /DA like
this.
By trial I found Adobe Reader uses rg from /DA as border color, and
doesn't take
font color from /DA at all (text is always black). That confuses me
quite a bit.
Is this really the Adobe interpretation of the standard?
If yes, and we follow the "do it like Adobe" guideline, this gets us
into
trouble. We can't simply use DA to set both font and border color, but
have to
embed AP, which means much more work left for #50.
More information about the poppler
mailing list