Branch Coverage

blib/lib/PDF/Builder.pm
Criterion Covered Total %
branch 383 982 39.0


line true false branch
308 19 215 if (defined $opts{'-compress'} and not defined $opts{'compress'})
309 0 234 if (defined $opts{'-diaglevel'} and not defined $opts{'diaglevel'})
310 0 234 if (defined $opts{'-outver'} and not defined $opts{'outver'})
311 0 234 if (defined $opts{'-msgver'} and not defined $opts{'msgver'})
312 0 234 if (defined $opts{'-file'} and not defined $opts{'file'})
327 234 0 unless $self->{'pages'}{'Resources'}->is_obj($self->{'pdf'})
336 154 80 if (exists $opts{'compress'}) { }
345 0 234 if (exists $opts{'diaglevel'}) { }
347 0 0 if ($diaglevel < 0 or $diaglevel > 5)
357 1 233 if (defined $opts{'outver'})
358 1 0 if ($opts{'outver'} >= 1.4) { }
364 1 233 if (defined $opts{'msgver'})
365 1 0 if ($opts{'msgver'} == 0 or $opts{'msgver'} == 1) { }
371 0 234 if ($opts{'file'})
422 1 0 if (@_)
461 4 3 unless (scalar @_)
462 0 4 unless ($self->{'pages'}{$type})
463 0 0 if $type eq "MediaBox"
466 0 0 if $type eq "CropBox"
546 0 8 unless -f $file
547 0 8 unless -r $file
551 0 8 unless CORE::open $scalar_fh, "+<", \$content
555 0 8 unless CORE::open $disk_fh, "<", $file
564 8 0 if ($data =~ /%%EOF$/)
627 0 18 if (defined $opts{'-diags'} and not defined $opts{'diags'})
628 0 18 if (defined $opts{'-compress'} and not defined $opts{'compress'})
629 0 18 if (defined $opts{'-diaglevel'} and not defined $opts{'diaglevel'})
631 0 18 if (ref $class)
641 18 0 if (defined $self->{'diaglevel'})
642 0 18 if ($diaglevel < 0 or $diaglevel > 5)
647 18 0 if (defined $newVer)
650 0 18 if ($pos < 0)
654 18 0 if ($verStr =~ /^%PDF-(\d+)\.(\d+)/) { }
659 0 18 if ($newVer > $currentVer)
660 0 0 if (length $newVer > length $currentVer) { }
665 0 0 if (length $newVer < length $currentVer)
676 0 18 unless CORE::open $fh, "+<", \$content
695 3 15 if (exists $opts{'compress'}) { }
704 0 18 if (exists $opts{'diaglevel'}) { }
706 0 0 if ($self->{'diaglevel'} < 0 or $self->{'diaglevel'} > 5)
769 7 170 if ($self->{'opened_scalar'}) { }
775 0 170 unless CORE::open $fh, ">", \$string
826 0 0 if ($self->{'opened_scalar'}) { }
0 0 elsif ($self->{'partial_save'}) { }
840 18 0 if (defined $object->{'Resources'})
851 0 20 if (defined $page->{'Type'} and $page->{'Type'}->val eq 'Pages') { }
856 20 0 if (defined $page->{'Resources'})
926 1 0 if ($self->{'opened_scalar'}) { }
0 0 elsif ($self->{'partial_save'}) { }
929 0 1 unless CORE::open $fh, ">", $file
983 0 0 if (defined $file)
990 0 0 if ($self->{'opened_scalar'}) { }
0 0 elsif ($self->{'partial_save'}) { }
1051 178 0 if defined $self->{'pdf'}
1267 2 0 if ($value =~ /([Z+-])/) { }
1278 0 2 unless $ts =~ /^D:([0-9]{4}) # D:YYYY (required)
1294 1 1 if ($od ne 'Z') { }
1298 0 1 unless $tz =~ /^([0-2][0-9]) # UT Offset Hours
1305 0 1 if ($oh == 0 and $om == 0)
1311 0 1 if ($tz ne "")
1318 1 1 if ($oh == 0 and $om == 0)
1326 1 1 if ($year % 400 == 0) { }
0 1 elsif ($year % 100 == 0) { }
0 1 elsif ($year % 4 == 0) { }
1336 1 1 if ($is_leap)
1338 0 2 unless $month >= 1 and $month <= 12
1339 0 2 unless $day >= 1 and $day <= 31
1340 0 2 if $day > $mon_len[$month - 1]
1341 0 2 unless $hour <= 23
1342 0 2 unless $minute <= 59
1343 0 2 unless $oh <= 23
1344 0 2 unless $om <= 59
1345 0 2 if $second > 60
1346 0 2 if ($second == 60)
1359 0 0 if ($od eq '+') { }
0 0 elsif ($od eq '-') { }
1364 0 0 if ($newm < 0)
1368 0 0 if ($newh < 0) { }
1371 0 0 if ($newd == 0) { }
1374 0 0 if ($newM == 0) { }
0 0 elsif ($newM == 6) { }
1396 0 0 if ($newm > 59)
1400 0 0 if ($newh > 23)
1403 0 0 if ($newd > $mon_len[$month - 1])
1407 0 0 if ($newM > 12)
1415 0 0 unless ($newM == 6 and $newd == 30 or $newM == 12 and $newd == 31)
1422 0 0 unless ($newM == 6 and $newd == 30 or $newM == 12 and $newd == 31)
1431 0 0 if ($newh == 23 and $newm == 59 and defined $leap_sec{$newM}{$newy}) { }
1475 0 7 unless (defined $field)
1476 0 0 unless exists $self->{'pdf'}{'Info'}
1480 0 0 if $key =~ /^ /
1481 0 0 unless defined $self->{'pdf'}{'Info'}{$key}
1488 4 3 if (@_)
1490 0 4 if defined $value and not length $value
1492 2 2 if ($field eq "CreationDate" or $field eq "ModDate")
1493 2 0 if (defined $value)
1495 0 2 unless $value =~ /^D:/
1496 0 2 unless _is_date($value)
1500 4 0 if (exists $self->{'pdf'}{'Info'}) { }
1501 0 0 unless defined $value
1509 3 1 if (defined $value) { }
1520 0 3 unless $self->{'pdf'}{'Info'}
1522 1 2 unless $self->{'pdf'}{'Info'}{$field}
1549 234 3 if (not defined $self->{'pdf'}{'Info'}) { }
1558 237 0 if (scalar @_)
1560 1661 235 unless defined $opt{$k}
1566 237 0 if (defined $self->{'pdf'}{'Info'})
1569 1659 237 unless defined $self->{'pdf'}{'Info'}{$k}
1571 0 237 if (unpack("n", $opt{$k}) == 65534 or unpack("n", $opt{$k}) == 65279)
1612 0 0 if (scalar @attr)
1637 0 0 if (not defined $self->{'catalog'}{'Metadata'}) { }
1652 0 0 if (defined $value)
1685 0 0 if (@_)
1745 0 8 if (defined $value)
1777 0 27 unless (defined $self->{'pdf'})
1802 1 2 if ($PDFver > $version) { }
1803 0 1 if ($msgVer)
1834 0 18 if ($PDFver > $version) { }
1835 0 0 if ($msgVer)
1865 0 0 defined $self->{'pdf'}{'Encrypt'} ? :
1897 1 3 if ($obj) { }
1906 3 0 unless $obj->is_obj($self->{'pdf'})
1995 0 0 unless (@_)
1996 0 0 unless $self->{'catalog'}{'PageLayout'}
1998 0 0 if $layout eq "SinglePage"
1999 0 0 if $layout eq "OneColumn"
2000 0 0 if $layout eq "TwoColumnLeft"
2001 0 0 if $layout eq "TwoColumnRight"
2002 0 0 if $layout eq "TwoPageLeft"
2003 0 0 if $layout eq "TwoPageRight"
2009 0 0 $name eq 'two_page_right' ? :
0 0 $name eq 'two_page_left' ? :
0 0 $name eq 'two_column_right' ? :
0 0 $name eq 'two_column_left' ? :
0 0 $name eq 'one_column' ? :
0 0 $name eq 'single_page' ? :
2016 0 0 unless $layout
2078 0 0 unless (@_)
2079 0 0 unless $self->{'catalog'}{'PageMode'}
2081 0 0 if $mode eq "UseNone"
2082 0 0 if $mode eq "UseOutlines"
2083 0 0 if $mode eq "UseThumbs"
2084 0 0 if $mode eq "FullScreen"
2085 0 0 if $mode eq "UseOC"
2086 0 0 if $mode eq "UseAttachments"
2092 0 0 $name eq 'attachments' ? :
0 0 $name eq 'optional_content' ? :
0 0 $name eq 'full_screen' ? :
0 0 $name eq 'thumbnails' ? :
0 0 $name eq 'outlines' ? :
0 0 $name eq 'none' ? :
2099 0 0 unless $mode
2127 0 0 unless (@_)
2157 0 239 if (defined $opts{'-fullscreen'} and not defined $opts{'fullscreen'})
2158 0 239 if (defined $opts{'-thumbs'} and not defined $opts{'thumbs'})
2159 0 239 if (defined $opts{'-outlines'} and not defined $opts{'outlines'})
2161 0 239 if (defined $opts{'-singlepage'} and not defined $opts{'singlepage'})
2162 0 239 if (defined $opts{'-onecolumn'} and not defined $opts{'onecolumn'})
2163 0 239 if (defined $opts{'-twocolumnleft'} and not defined $opts{'twocolumnleft'})
2164 0 239 if (defined $opts{'-twocolumnright'} and not defined $opts{'twocolumnright'})
2166 0 239 if (defined $opts{'-hidetoolbar'} and not defined $opts{'hidetoolbar'})
2167 0 239 if (defined $opts{'-hidemenubar'} and not defined $opts{'hidemenubar'})
2168 0 239 if (defined $opts{'-hidewindowui'} and not defined $opts{'hidewindowui'})
2169 0 239 if (defined $opts{'-fitwindow'} and not defined $opts{'fitwindow'})
2170 0 239 if (defined $opts{'-centerwindow'} and not defined $opts{'centerwindow'})
2171 0 239 if (defined $opts{'-displaytitle'} and not defined $opts{'displaytitle'})
2172 0 239 if (defined $opts{'-righttoleft'} and not defined $opts{'righttoleft'})
2173 0 239 if (defined $opts{'-afterfullscreenthumbs'} and not defined $opts{'afterfullscreenthumbs'})
2174 0 239 if (defined $opts{'-afterfullscreenoutlines'} and not defined $opts{'afterfullscreenoutlines'})
2175 0 239 if (defined $opts{'-printscalingnone'} and not defined $opts{'printscalingnone'})
2176 1 238 if (defined $opts{'-simplex'} and not defined $opts{'simplex'})
2177 1 238 if (defined $opts{'-duplexfliplongedge'} and not defined $opts{'duplexfliplongedge'})
2178 1 238 if (defined $opts{'-duplexflipshortedge'} and not defined $opts{'duplexflipshortedge'})
2180 2 237 if (defined $opts{'-firstpage'} and not defined $opts{'firstpage'})
2181 0 239 if (defined $opts{'-fit'} and not defined $opts{'fit'})
2182 0 239 if (defined $opts{'-fith'} and not defined $opts{'fith'})
2183 0 239 if (defined $opts{'-fitb'} and not defined $opts{'fitb'})
2184 0 239 if (defined $opts{'-fitbh'} and not defined $opts{'fitbh'})
2185 0 239 if (defined $opts{'-fitv'} and not defined $opts{'fitv'})
2186 0 239 if (defined $opts{'-fitbv'} and not defined $opts{'fitbv'})
2187 0 239 if (defined $opts{'-fitr'} and not defined $opts{'fitr'})
2188 0 239 if (defined $opts{'-xyz'} and not defined $opts{'xyz'})
2191 0 239 if ($opts{'fullscreen'}) { }
0 239 elsif ($opts{'thumbs'}) { }
0 239 elsif ($opts{'outlines'}) { }
2202 0 239 if ($opts{'singlepage'}) { }
0 239 elsif ($opts{'onecolumn'}) { }
0 239 elsif ($opts{'twocolumnleft'}) { }
0 239 elsif ($opts{'twocolumnright'}) { }
2218 0 239 if ($opts{'hidetoolbar'})
2221 0 239 if ($opts{'hidemenubar'})
2224 0 239 if ($opts{'hidewindowui'})
2227 0 239 if ($opts{'fitwindow'})
2230 0 239 if ($opts{'centerwindow'})
2233 0 239 if ($opts{'displaytitle'})
2236 0 239 if ($opts{'righttoleft'})
2240 0 239 if ($opts{'afterfullscreenthumbs'}) { }
0 239 elsif ($opts{'afterfullscreenoutlines'}) { }
2248 0 239 if ($opts{'printscalingnone'})
2252 1 238 if ($opts{'simplex'}) { }
1 237 elsif ($opts{'duplexfliplongedge'}) { }
1 236 elsif ($opts{'duplexflipshortedge'}) { }
2261 2 237 if ($opts{'firstpage'})
2263 0 2 unless scalar keys %args
2267 1 1 unless ref $page
2270 2 0 if (defined $args{'-fit'} and not defined $args{'fit'})
2271 0 2 if (defined $args{'-fith'} and not defined $args{'fith'})
2272 0 2 if (defined $args{'-fitb'} and not defined $args{'fitb'})
2273 0 2 if (defined $args{'-fitbh'} and not defined $args{'fitbh'})
2274 0 2 if (defined $args{'-fitv'} and not defined $args{'fitv'})
2275 0 2 if (defined $args{'-fitbv'} and not defined $args{'fitbv'})
2276 0 2 if (defined $args{'-fitr'} and not defined $args{'fitr'})
2277 0 2 if (defined $args{'-xyz'} and not defined $args{'xyz'})
2279 2 0 if (defined $args{'fit'}) { }
0 0 elsif (defined $args{'fith'}) { }
0 0 elsif (defined $args{'fitb'}) { }
0 0 elsif (defined $args{'fitbh'}) { }
0 0 elsif (defined $args{'fitv'}) { }
0 0 elsif (defined $args{'fitbv'}) { }
0 0 elsif (defined $args{'fitr'}) { }
0 0 elsif (defined $args{'xyz'}) { }
2292 0 0 unless scalar @{$args{'fitr'};} == 4
2296 0 0 unless scalar @{$args{'xyz'};} == 3
2309 0 0 if (defined $object->{'Resources'})
2320 0 0 if (defined $page->{'Type'} and $page->{'Type'}->val eq 'Pages') { }
2326 0 0 if (defined $page->{'Resources'})
2376 190 2 if ($index == 0) { }
2391 180 12 if ($pgs_size == 0) { }
0 12 elsif ($pgs_size < -$index) { }
0 12 elsif ($pgs_size < $index) { }
2392 0 180 if $index != 0
2403 190 2 if ($index == 0) { }
0 2 elsif ($index < 0) { }
2464 0 7 if ($index == 0) { }
0 7 elsif ($index < 0) { }
2471 0 7 unless ref $page
2473 6 1 if (ref $page ne "PDF::Builder::Page")
2480 0 6 if ($rotate = $page->find_prop('Rotate') and not $page->{' opened'}) { }
2483 0 0 if ($rotate != 0 and not $self->default('nounrotate')) { }
2486 0 0 if ($media = $page->find_prop($mediatype)) { }
2490 0 0 if $mediatype ne "MediaBox"
2492 0 0 if ($rotate == 90) { }
0 0 elsif ($rotate == 180) { }
0 0 elsif ($rotate == 270) { }
2493 0 0 if $mediatype eq "MediaBox"
2496 0 0 if $mediatype eq "MediaBox"
2498 0 0 if $mediatype eq "MediaBox"
2510 4 2 if (defined $page->{'Contents'} and not $page->{' opened'})
2516 0 4 if ($self->default("pageencaps"))
2523 0 4 if ($self->default("pageencaps"))
2528 4 0 if ($self->{'forcecompress'} eq "flate" or $self->{'forcecompress'} =~ /^[1-9]\d*$/)
2609 0 1 unless (ref $s_pdf and $s_pdf->isa("PDF::Builder"))
2613 0 1 if (ref $s_idx eq 'PDF::Builder::Page') { }
2617 0 1 unless defined $s_page
2620 0 1 if (ref $t_idx eq 'PDF::Builder::Page') { }
2623 0 1 if ($self->pages < $t_idx) { }
2641 4 1 unless defined $prop
2652 0 0 if (exists $s_page->{'Annots'} and $s_page->{'Annots'} and $self->{'copyannots'})
2655 0 0 if (my $a = $s_pdf->{'pdf'}{'Root'}->realise->{'AcroForm'})
2688 0 0 if $AcroForm
2704 0 0 unless defined $a->{$k}
2710 0 0 if $AcroForm and $t_a->{'Subtype'}->val eq "Widget"
2713 0 0 if $AcroForm
2778 0 4 unless (ref $s_pdf and $s_pdf->isa("PDF::Builder"))
2786 1 3 if (ref $s_idx eq 'PDF::Builder::Page') { }
2790 0 3 unless defined $s_page
2801 0 4 unless defined $s_page->find_prop($k)
2807 0 4 unless defined $xo->{'BBox'}
2811 0 4 unless defined $s_page->{$k}
2812 0 4 if ref($s_page->{$k}) =~ /Objind$/
2815 27 5 unless defined $s_page->{$k}{$sk}
2816 0 5 if ref($s_page->{$k}{$sk}) =~ /Objind$/
2818 9 1 if $ssk =~ /^ /
2829 0 4 unless ($s_page->{' opened'})
2833 3 1 if (defined $s_page->{'Contents'})
2840 3 0 if ($k->{' nofilt'}) { }
2849 2 1 if $self->{'forcecompress'} eq "flate" or $self->{'forcecompress'} =~ /^[1-9]\d*$/
2860 1 517 if (ref($source_object) =~ /Objind$/)
2864 0 518 if defined $$object_cache{scalar $source_object}
2870 1 517 if $source_object->is_obj($source_pdf)
2874 7 511 if (ref($source_object) =~ /Array$/) { }
2 509 elsif (ref($source_object) =~ /Dict$/) { }
2877 0 501 if ref($k) =~ /Objind$/
2881 2 0 unless scalar @keys
2883 1 11 if $k =~ /^ /
2884 0 11 unless defined $source_object->{$k}
2887 0 2 if ($source_object->{' stream'})
2888 0 0 if ($target_object->{'Filter'}) { }
3128 0 0 if ($page_number <= 0)
3133 0 0 if (ref %opts ne "")
3150 0 8 if ($index < 0)
3156 0 8 if (ref $opts ne "HASH")
3161 0 8 if (defined $opts->{'-style'} and not defined $opts->{'style'})
3162 0 8 if (defined $opts->{'-prefix'} and not defined $opts->{'prefix'})
3163 0 8 if (defined $opts->{'-start'} and not defined $opts->{'start'})
3168 6 2 if (defined $opts->{'style'}) { }
3169 6 0 if ($opts->{'style'} ne 'nocounter') { }
3176 1 0 $opts->{'style'} eq 'decimal' ? :
1 1 $opts->{'style'} eq 'arabic' ? :
1 2 $opts->{'style'} eq 'alpha' ? :
1 3 $opts->{'style'} eq 'Alpha' ? :
1 4 $opts->{'style'} eq 'roman' ? :
1 5 $opts->{'style'} eq 'Roman' ? :
3185 1 7 if (defined $opts->{'prefix'})
3190 1 7 if (defined $opts->{'start'}) { }
3225 0 0 if (float($value) <= 0)
3233 0 0 if (defined $self->{'pages'}{'MediaBox'})
3234 0 0 if ($value != 1)
3249 236 16 if (scalar @corners and $corners[0] =~ /[a-z]/i)
3251 0 252 if (scalar @corners == 3) { }
3255 0 0 if (defined $opts{'-orient'} and not defined $opts{'orient'})
3258 0 0 if (defined $opts{'orient'})
3259 0 0 if ($opts{'orient'} =~ /^l/i)
3272 0 252 if ($isName and $UU != 1)
3287 8 266 unless (defined $self->{'pages'}{$boxname})
3288 2 6 if ($boxname eq 'CropBox') { }
6 0 elsif ($boxname eq 'BleedBox' or $boxname eq 'TrimBox' or $boxname eq 'ArtBox') { }
3293 0 6 if (defined $self->{'pages'}{'CropBox'}) { }
3336 240 6 if (defined $corners[0])
3370 3 4 if (defined $corners[0])
3404 3 4 if (defined $corners[0])
3438 3 4 if (defined $corners[0])
3474 3 4 if (defined $corners[0])
3518 0 37 if (defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'})
3521 0 37 unless ("PDF::Builder::Resource::Font::CoreFont"->is_standard($name))
3522 0 0 if ($name =~ /^Times$/i)
3525 0 0 unless ($MSG_COUNT[3])
3535 0 37 if $opts{'unicodemap'}
3559 0 0 if (defined $opts{'-afmfile'} and not defined $opts{'afmfile'})
3560 0 0 if (defined $opts{'-afm_file'} and not defined $opts{'afm_file'})
3561 0 0 if (defined $opts{'-pfmfile'} and not defined $opts{'pfmfile'})
3562 0 0 if (defined $opts{'-pfm_file'} and not defined $opts{'pfm_file'})
3563 0 0 if (defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'})
3566 0 0 if (defined $opts{'afm_file'})
3567 0 0 if (defined $opts{'pfm_file'})
3570 0 0 unless defined $opts{$o}
3578 0 0 if $opts{'unicodemap'}
3603 0 0 if (defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'})
3606 0 0 if (defined $opts{'-noembed'} and not defined $opts{'noembed'})
3607 0 0 if (defined $opts{'-embed'} and not defined $opts{'embed'})
3613 0 0 unless exists $opts{'unicodemap'}
3615 0 0 if (defined $opts{'noembed'} and not defined $opts{'embed'})
3620 0 0 UNIVERSAL::isa($file, 'Font::TTF::Font') ? :
0 0 unless $file = UNIVERSAL::isa($file, "Font::TTF::Font") ? $file : _findFont($file)
3626 0 0 if $opts{'unicodemap'}
3690 0 1 if (defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'})
3696 0 1 if $opts{'unicodemap'}
3773 0 0 if (defined $opts{'-kerning'} and not defined $opts{'kerning'})
3774 0 0 if (defined $opts{'-dokern'} and not defined $opts{'dokern'})
3775 0 0 if (defined $opts{'-embed'} and not defined $opts{'embed'})
3777 0 0 if (exists $opts{'kerning'})
3784 0 0 if ('PDF::Builder::Resource::Font::CoreFont'->is_standard($name)) { }
0 0 elsif ($name =~ /^Times$/i and not $opts{'format'}) { }
3794 0 0 if UNIVERSAL::isa($name, "Font::TTF::Font")
3795 0 0 $name =~ /\.bdf$/i ? :
0 0 $name =~ /\.t1$/i ? :
0 0 $name =~ /\.pf[ab]$/i ? :
0 0 $name =~ /\.[ot]tf$/i ? :
3800 0 0 if ($format eq 'truetype') { }
0 0 elsif ($format eq 'type1') { }
0 0 elsif ($format eq 'bitmap') { }
0 0 elsif ($format) { }
0 0 elsif ($name =~ /(\..*)$/) { }
3832 1 0 if (@_ and $_[0])
3860 0 0 if (@_ and $_[0])
3908 0 0 if ref $_[0]
3909 0 0 if $_[0] eq __PACKAGE__
3936 0 39 if ref $_[0]
3937 39 0 if $_[0] eq __PACKAGE__
3949 0 0 if -f $font
3950 0 0 if substr($font, 0, 1) eq "/"
3954 0 0 if -f "$directory/$font"
3993 0 0 if (defined $opts{'-unicodemap'} and not defined $opts{'unicodemap'})
3995 0 0 unless (defined $opts{'-entry_point'})
4001 0 0 unless exists $opts{'unicodemap'}
4007 0 0 if $opts{'unicodemap'}
4225 0 3 if (ref $file eq 'GD::Image') { }
3 0 elsif (ref $file) { }
4233 0 3 unless (ref $file)
4234 0 0 $file =~ /\.p[bgpn]m$/i ? :
0 0 $file =~ /\.svg?$/i ? :
0 0 $file =~ /\.tiff?$/i ? :
0 0 $file =~ /\.gif$/i ? :
0 0 $file =~ /\.png$/i ? :
0 0 $file =~ /\.jpe?g$/i ? :
4243 1 2 if ($format eq 'jpeg') { }
1 1 elsif ($format eq 'png') { }
1 0 elsif ($format eq 'gif') { }
0 0 elsif ($format eq 'tiff') { }
0 0 elsif ($format eq 'svg') { }
0 0 elsif ($format eq 'pnm') { }
0 0 elsif ($format) { }
0 0 elsif (ref $file) { }
0 0 elsif ($file =~ /(\..*)$/) { }
4269 3 0 if (ref $fh ne "SCALAR")
4275 0 3 if (ref $fh eq 'SCALAR') { }
4282 0 3 unless $bytes_read and $bytes_read == 8
4284 1 2 if $test =~ /^GIF\d\d[a-z]/
4285 1 1 if $test =~ /^\xFF\xD8\xFF/
4286 1 0 if $test =~ /^\x89PNG\x0D\x0A\x1A\x0A/
4287 0 0 if $test =~ /^\s*P[1-6]/
4289 0 0 if $test =~ /^II\x2A\x00/
4290 0 0 if $test =~ /^MM\x00\x2A/
4296 0 0 if $test =~ /<svg\s/is
4356 0 4 if (defined $opts{'-nouseGT'} and not defined $opts{'nouseGT'})
4357 0 4 if (defined $opts{'-silent'} and not defined $opts{'silent'})
4361 0 4 if ($rc)
4363 0 0 if (defined $opts{'nouseGT'} and $opts{'nouseGT'} == 1)
4367 0 4 if ($rc == 1) { }
4378 1 2 if ($rc == 0 and $MSG_COUNT[0]++ == 0)
4381 0 1 if (not defined $opts{'silent'} or $opts{'silent'} == 0)
4426 4 0 unless (defined $rc)
4427 0 4 if ($rc)
4429 0 0 if ("version"->parse("v$Graphics::TIFF::VERSION")->numify < "version"->parse("v$GrTFversion")->numify)
4494 0 5 if (defined $opts{'-nouseIPL'} and not defined $opts{'nouseIPL'})
4495 0 5 if (defined $opts{'-silent'} and not defined $opts{'silent'})
4499 0 5 if ($rc)
4501 0 0 if (defined $opts{'nouseIPL'} and $opts{'nouseIPL'} == 1)
4505 0 5 if ($rc == 1) { }
4516 1 3 if ($rc == 0 and $MSG_COUNT[1]++ == 0)
4519 0 1 if (not defined $opts{'silent'} or $opts{'silent'} == 0)
4563 5 0 unless (defined $rc)
4564 0 5 if ($rc)
4566 0 0 if ("version"->parse("v$Image::PNG::Libpng::VERSION")->numify < "version"->parse("v$LpngVersion")->numify)
4636 1 0 unless (defined $rc)
4637 0 1 if ($rc)
4639 0 0 if ("version"->parse("v$SVGPDF::VERSION")->numify < "version"->parse("v$SVGPDFver")->numify)
4642 1 0 unless ($rc)
4650 0 0 if (defined $opts{'compress'} and $opts{'compress'} == 0)
4692 1 0 unless (defined $rc)
4693 0 1 if ($rc)
4695 0 0 if ("version"->parse("v$SVGPDF::VERSION")->numify < "version"->parse("v$SVGPDFver")->numify)
4854 0 0 if ($type eq 'act') { }
0 0 elsif ($type eq 'web') { }
0 0 elsif ($type eq 'hue') { }
0 0 elsif ($type eq 'spot') { }
0 0 elsif ($type eq 'device') { }
5215 0 1 unless (defined $obj)
5327 0 0 if (exists $state{'tag_lists'}{$listname}) { }
5339 0 0 if ($list[$ti] eq $list[$tj])
5418 0 18 unless length $string
5420 18 0 if ($string =~ /^%PDF-([\d.]+)/)
5431 0 38 unless length $_
5438 0 171 unless length $rawObject
5441 23 148 if ($rawObject =~ /^(.*)stream\s.*\sendstream(.*)$/s)
5446 133 38 if ($rawObject =~ /^(.*?)\s?(\d+) (\d+) obj\s(.*)$/s or $rawObject =~ /^(.*?)\s?(\d+) (\d+) obj(.*)$/s) { }
5455 9 124 if (defined $objList{$objKey} and $update > 0)
5462 49 84 unless (defined $objList{$objKey})
5477 27 106 if ($rawObject =~ m[/Parent(\s+)(\d+)(\s+)(\d+)(\s+)R])
5494 20 113 if ($rawObject =~ m(/Kids(\s+)\[(.*)\]))
5502 22 20 if ($str2 =~ /(\s+)(\d+)(\s+)(\d+)(\s+)R/) { }
5526 18 115 if ($rawObject =~ m[/Type(\s+)/Catalog])
5528 0 18 if ($rawObject =~ m[/Version /(\d+)\.(\d+)])
5539 3 130 if ($rawObject =~ m[/Type(\s+)/XRef] or $rawObject =~ m[/Type/XRef])
5541 3 0 if ($rawObject =~ m[/Root(\s+)(\d+)(\s+)(\d+)(\s+)R])
5547 3 0 if ($rawObject =~ m[/Info(\s+)(\d+)(\s+)(\d+)(\s+)R])
5558 74 133 if ($rawObject =~ /(\d+)(\s+)(\d+)(\s+)R/) { }
5570 63 11 unless (defined $objList{$_})
5576 19 110 unless (defined $objList{$_})
5585 18 20 if ($rawObject =~ /trailer/)
5586 18 0 if ($rawObject =~ m[trailer(.*)/Info(\s+)(\d+)(\s+)(\d+)(\s+)R]s)
5589 18 0 if ($rawObject =~ m[trailer(.*)/Root(\s+)(\d+)(\s+)(\d+)(\s+)R]s)
5599 0 18 if (not defined $Root) { }
5600 0 0 if $level >= $level_error
5603 0 18 unless (defined $objList{$Root})
5604 0 0 if ($Version > 1.4) { }
5607 0 0 if $level >= $level_warning
5610 0 0 if $level >= $level_error
5618 0 18 if (not defined $Info) { }
5619 0 0 if $level >= $level_note
5621 0 18 unless (defined $objList{$Info})
5623 0 0 if ($Version > 1.4) { }
5626 0 0 if $level >= $level_warning
5629 0 0 if $level >= $level_warning
5631 0 0 if $level >= $level_warning
5648 2 129 if ($objList{$thisObj}[$idx_defined] == 0)
5649 2 0 if ($Version > 1.4) { }
5650 0 2 if $level >= $level_note
5652 0 0 if $level >= $level_warning
5659 17 114 if ($objList{$thisObj}[$idx_kid_cnt] > 0)
5664 20 0 if ($objList{$child}[$idx_par_clmd] == -1) { }
5669 0 0 if $level >= $level_error
5674 20 0 if ($objList{$child}[$idx_defined] == 1)
5676 0 20 if ($objList{$child}[$idx_parent] == -1) { }
0 20 elsif ($objList{$child}[$idx_parent] != $thisObj) { }
5677 0 0 if $level >= $level_error
5681 0 0 if $level >= $level_error
5689 8 123 if ($objList{$thisObj}[$idx_parent] == -1 and $objList{$thisObj}[$idx_refcount] == 0)
5691 0 8 if $level >= $level_note
5695 0 18 if ($level >= $level_dump)
5704 0 18 if ($level >= $level_dumpself)