Create text on line ViewControl

The PDF standard supports

Text Off Set
Font Color
Text Size

However, not aware of any PDF viewers actually supporting customizing Text Color and Text Size, not Adobe, nor any other major vendors.

So if you adjust Font Color and Text Size, and anyone later on adjusts the annotation, those customizations would be lost.

But if they are important for you then yes you would have to either make your own stream, or better yet, modify the default appearance. You could follow the examples in the forum post below to change the GState of any text to be the color you want. Adjusting the font size though would be much more complicated since it could overlap the line, or even be clipped by the annotation bounding box.

Why is setting color and size important for your users (especially considering Adobe doesn’t support this)?

2 Likes