ssimms / pdfapi2

Create, modify, and examine PDF files in Perl
Other
15 stars 20 forks source link

Incompatible change in pageLabel #40

Closed sciurius closed 2 years ago

sciurius commented 2 years ago

Before the last changes, pageLabel accepted style arguments roman, arabic, etc. In 2.042, it merely takes the first letter (provided it is a, d or r). In short, arabic now comes out as a (lowercase letters) instead of D (Decimal arabic numerals).

See https://github.com/ssimms/pdfapi2/pull/39 for a possible fix.

ssimms commented 2 years ago

That's an interesting backward compatibility bug. arabic wasn't a valid/documented value for -style (documented options were Roman, roman, Alpha, alpha, and decimal), but it happened to work because the if statement defaulted to decimal, as you noted in your suggested fix.

I've implemented a similar fix, with the addition of a warning if pageLabel is passed an invalid value.