Home > Net >  PDF link annotation color space (border)
PDF link annotation color space (border)

Time:09-04

I try to understand the color entry for a Link annotation.

Section 8.4.1 of the PDF 1.7 specification is about annotation dictionaries (common to all annotation types) where the table 8.15 describes an entry C as

An array of numbers in the range 0.0 to 1.0, representing a color used for the following purposes:

• The background of the annotation’s icon when closed
• The title bar of the annotation’s pop-up window
• The border of a link annotation

The number of array elements determines the color space in which the color is defined:

0 No color; transparent
1 DeviceGray
3 DeviceRGB
4 DeviceCMYK

So I assume that the link annotation in this form

<<
  /A <<
    /S /URI
    /Type /Action
    /URI (www.example.com)
  >>
  /C [
    0.22
    0
    0.55
    0
  ]
  /Rect [
    28.346
    801.543
    50.586
    813.543
  ]
  /Subtype /Link
  /Type /Annot
>>

should be a color in the color space DeviceCMYK (four numbers in the array) and should be some greenish color. But it appears that the color is treated as RGB

purple border around a few gibberish letters

(screenshot from Foxit PDF reader, similar to Acrobat)

R: 56/255, G: 0/255, B: 140/255

So there is a misunderstanding on my side here, but where is it?

CodePudding user response:

Your understanding is correct, it seems this is a bug in many viewers.

XODO displays the border correctly.

  •  Tags:  
  • pdf
  • Related