Subject: | prMbox() not dealing with 0 ux/uy |
Stuff like this:
/MediaBox[780.04 1086.94 0 0]
crops up in the wild. When fed the above values, prMbox() will silently use its default ux and uy (which renders the output PDF unuseable, that's why I assigned "critical"):
sub prMbox
{ my $lx = shift || 0;
my $ly = shift || 0;
my $ux = shift || 595; # doesn't handle 0
my $uy = shift || 842; # doesn't handle 0
Wouldn't this be better written as:
sub prMbox
{ my $lx = defined($_[0]) ? shift : 0;
my $ly = defined($_[0]) ? shift : 0;
my $ux = defined($_[0]) ? shift : 595;
my $uy = defined($_[0]) ? shift : 842;
Best regards
Thomas