Closed sciurius closed 2 years ago
Interesting. It appears that PDF::API2 has always set the Border
default (in new()
) to be [0 0 0]
, while in PDF::Builder 3.008 I changed it to [0 0 1]
, apparently to match the PDF spec for Border
(Table 164 – Entries common to all annotation dictionaries in the PDF 32000-1:2008 document).
It sounds like if you don't have an explicit /Border [hr vr bw]
entry in the annotation dictionary, it should treat it as /Border [0 0 1]
. If PDF::API2 by default has chosen to suppress annotation borders by explicitly giving /Border [0 0 0]
in most cases (which will appear in the PDF file), and that behavior is more desirable, I could revert to [0 0 0]
(no border by default). Would that be good? As it stands now, it apparently doesn't match PDF::API2's default behavior.
The default PDF behaviour is to add a border (0,0,1). This is also in the docs of PDF::API2::Annotation
.
However, PDF::API2::Annotation
has always explicitly supressed the border with (0,0,0) so I think we should stick to that that behaviour.
Yes, it is confusing. PDF::API2 defaults Border
to [0 0 0]
, yet in border()
says the default is [0 0 1]
. I'll go ahead and revert to [0 0 0]
(no border), since people are used to that behavior. As for the default behavior of a PDF reader being [0 0 1]
, it's not a huge deal to have to give -border => [0, 0, 1]
if you want one.
Annotation.pm updated (as well as some examples and t test). Hopefully that should do it.
PDF::Builder
creates annotations with a border,PDF::API2
does not.PDF/Builder/Annotations.pm line 31
this should be