| 1 | package Text::PDF::Dict; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use vars qw(@ISA $mincache $tempbase $cr); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # no warnings qw(uninitialized); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use Text::PDF::Objind; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | @ISA = qw(Text::PDF::Objind); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | $cr = '(?:\015|\012|(?:\015\012))'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use Text::PDF::Filter; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | BEGIN | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | ▶ | my $temp_dir = -d '/tmp' ? '/tmp' : $ENV{TMP} || $ENV{TEMP}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=3 SCAR=14.2
Branch: 1 branch
Condition0%0/3
$ENV{"TMP"} or $ENV{"TEMP"}
MC/DC0%0/2
$ENV{"TMP"} or $ENV{"TEMP"}
$ENV{"TMP"}
$ENV{"TEMP"}
Truth table0%0/3
A or B
A= $ENV{"TMP"}B= $ENV{"TEMP"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | $tempbase = sprintf("%s/%d-%d-0000", $temp_dir, $$, time()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | $mincache = 32768; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | =head1 NAME | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | Text::PDF::Dict - PDF Dictionaries and Streams. Inherits from L<PDF::Objind> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | =head1 INSTANCE VARIABLES | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | There are various special instance variables which are used to look after, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | particularly, streams. Each begins with a space: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | =over | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | =item stream | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | Holds the stream contents for output | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | =item streamfile | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | Holds the stream contents in an external file rather than in memory. This is | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | not the same as a PDF file stream. The data is stored in its unfiltered form. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | =item streamloc | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | If both ' stream' and ' streamfile' are empty, this indicates where in the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | source PDF the stream starts. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | =back | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | =head1 METHODS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | =cut | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | sub new | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 10 | ▶ | my ($class, @opts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 10 | my ($self); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 10 | ▶ | $class = ref $class if ref $class; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 10 | $self = $class->SUPER::new(@_); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 10 | $self->{' realised'} = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 10 | return $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | =head2 $d->outobjdeep($fh) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | Outputs the contents of the dictionary to a PDF file. This is a recursive call. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | It also outputs a stream if the dictionary has a stream element. If this occurs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | then this method will calculate the length of the stream and insert it into the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | stream's dictionary. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | =cut | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | sub outobjdeep | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 8 | ▶ | my ($self, $fh, $pdf, %opts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
outobjdeep: called CC=45 SCAR=62.1
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 8 | my ($key, $val, $f, @filts); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 8 | my ($loc, $str, %specs, $len); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 8 | ▶ | if (defined $self->{' stream'} or defined $self->{' streamfile'} or defined $self->{' streamloc'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
defined $self->{" stream"} or defined $self->{" streamfile"} or defined $self->{" streamloc"}
defined $self->{" stream"} or defined $self->{" streamfile"}
MC/DC33%1/3
defined $self->{" stream"} or defined $self->{" streamfile"} or defined $self->{" streamloc"}
defined $self->{" stream"}
defined $self->{" streamfile"}
defined $self->{" streamloc"}
Truth table50%2/4
A or B or C
A= defined $self->{" stream"}B= defined $self->{" streamfile"}C= defined $self->{" streamloc"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 1 | ▶ | if ($self->{'Filter'} || !defined $self->{' stream'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$self->{"Filter"} or not defined $self->{" stream"}
MC/DC0%0/2
$self->{"Filter"} or not defined $self->{" stream"}
$self->{"Filter"}
not defined $self->{" stream"}
Truth table33%1/3
A or not(B)
A= $self->{"Filter"}B= not defined $self->{" stream"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | $self->{'Length'} = Text::PDF::Number->new(0) unless (defined $self->{'Length'}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | $pdf->new_obj($self->{'Length'}) unless ($self->{'Length'}->is_obj($pdf)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | # $pdf->out_obj($self->{'Length'}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 1 | ▶ | $self->{'Length'} = Text::PDF::Number->new(length($self->{' stream'}) + ($self->{' stream'} =~ m/$cr$/o ? 0 : 1)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 8 | $fh->print("<<\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 8 | foreach ('Type', 'Subtype') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 16 | $specs{$_} = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 16 | ▶ | if (defined $self->{$_}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 5 | $fh->print("/$_ "); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 5 | $self->{$_}->outobj($fh, $pdf, %opts); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 5 | $fh->print("\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 8 | ▶ | while (($key, $val) = each %{$self}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 39 | ▶ | next if ($key =~ m/^[\s\-]/o || $specs{$key}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$key =~ /^[\s\-]/o or $specs{$key}
MC/DC100%2/2
$key =~ /^[\s\-]/o or $specs{$key}
$key =~ /^[\s\-]/o
$specs{$key}
Truth table100%3/3
A or B
A= $key =~ /^[\s\-]/oB= $specs{$key}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 15 | ▶ | next if ($val eq ''); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 15 | $key = Text::PDF::Name::string_to_name ($key, $pdf); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 15 | $fh->print("/$key "); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 15 | $val->outobj($fh, $pdf, %opts); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 15 | $fh->print("\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 8 | $fh->print('>>'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | #now handle the stream (if any) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 8 | ▶ | if (defined $self->{' streamloc'} && !defined $self->{' stream'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self->{" streamloc"} and not defined $self->{" stream"}
MC/DC0%0/2
defined $self->{" streamloc"} and not defined $self->{" stream"}
defined $self->{" streamloc"}
not defined $self->{" stream"}
Truth table33%1/3
A and not(B)
A= defined $self->{" streamloc"}B= not defined $self->{" stream"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | { # read a stream if infile | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | $loc = $fh->tell; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | $self->read_stream; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | $fh->seek($loc, 0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 8 | ▶ | if (!$self->{' nofilt'} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%6/9
not $self->{" nofilt"} and defined $self->{" stream"} || defined $self->{" streamfile"} and defined $self->{"Filter"}
not $self->{" nofilt"} and defined $self->{" stream"} || defined $self->{" streamfile"}
defined $self->{" stream"} or defined $self->{" streamfile"}
MC/DC0%0/4
not $self->{" nofilt"} and defined $self->{" stream"} || defined $self->{" streamfile"} and defined $self->{"Filter"}
not $self->{" nofilt"}
defined $self->{" stream"}
defined $self->{" streamfile"}
defined $self->{"Filter"}
Truth table33%2/6
not(A) and B or C and D
A= not $self->{" nofilt"}B= defined $self->{" stream"}C= defined $self->{" streamfile"}D= defined $self->{"Filter"}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | && (defined $self->{' stream'} || defined $self->{' streamfile'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | && defined $self->{'Filter'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | my ($hasflate) = -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | my ($temp, $i, $temp1, @filtlist); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | if (ref($self->{'Filter'}) eq 'Text::PDF::Name') | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | { push(@filtlist, $self->{'Filter'}->val); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | ▶ | for ($i = 0; $i < scalar @{$self->{'Filter'}{' val'}}; $i++) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | { push (@filtlist, $self->{'Filter'}{' val'}[$i]->val); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | foreach $temp (@filtlist) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | ▶ | if ($temp eq 'LZWDecode') # hack to get around LZW patent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | if ($hasflate < -1) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | $hasflate = $i; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | next; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | $temp = 'FlateDecode'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | $self->{'Filter'}{' val'}[$i]{'val'} = $temp; # !!! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } elsif ($temp eq 'FlateDecode') | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | { $hasflate = -2; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | $temp1 = "Text::PDF::$temp"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | push (@filts, $temp1->new); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | splice(@{$self->{'Filter'}{' val'}}, $hasflate, 1) if ($hasflate > -1); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 8 | ▶ | if (defined $self->{' stream'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 1 | $fh->print("\nstream\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 1 | $loc = $fh->tell; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 1 | $str = $self->{' stream'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 1 | ▶ | unless ($self->{' nofilt'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 1 | foreach $f (reverse @filts) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | { $str = $f->outfilt($str, 1); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 1 | $fh->print($str); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 1 | ▶ | if (@filts > 0) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | $len = $fh->tell - $loc + 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | if ($self->{'Length'}{'val'} != $len) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | $self->{'Length'}{'val'} = $len; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | $pdf->out_obj($self->{'Length'}) if ($self->{'Length'}->is_obj($pdf)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 1 | ▶ | $fh->print("\n") unless ($str =~ m/$cr$/o); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 1 | $fh->print("endstream"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | # $self->{'Length'}->outobjdeep($fh); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | } elsif (defined $self->{' streamfile'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | ▶ | open(DICTFH, $self->{' streamfile'}) || die "Unable to open $self->{' streamfile'}"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | binmode DICTFH; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | $fh->print("\nstream\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | $loc = $fh->tell; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | while (read(DICTFH, $str, 4096)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | ▶ | unless ($self->{' nofilt'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | foreach $f (reverse @filts) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | { $str = $f->outfilt($str, 0); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | $fh->print($str); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | close(DICTFH); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | ▶ | unless ($self->{' nofilt'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | $str = ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | foreach $f (reverse @filts) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | { $str = $f->outfilt($str, 1); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | $fh->print($str); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | $len = $fh->tell - $loc + 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | ▶ | if ($self->{'Length'}{'val'} != $len) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | 0 | $self->{'Length'}{'val'} = $len; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | ▶ | $pdf->out_obj($self->{'Length'}) if ($self->{'Length'}->is_obj($pdf)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | ▶ | $fh->print("\n") unless ($str =~ m/$cr$/o); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 0 | $fh->print("endstream\n"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | # $self->{'Length'}->outobjdeep($fh); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | =head2 $d->read_stream($force_memory) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | Reads in a stream from a PDF file. If the stream is greater than | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | C<PDF::Dict::mincache> (defaults to 32768) bytes to be stored, then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | the default action is to create a file for it somewhere and to use that | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | file as a data cache. If $force_memory is set, this caching will not | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | occur and the data will all be stored in the $self->{' stream'} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | variable. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | =cut | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | sub read_stream | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 1 | ▶ | my ($self, $force_memory) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
read_stream: called CC=13 SCAR=34.3
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 1 | my ($fh) = $self->{' streamsrc'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 1 | my (@filts, $f, $last, $i, $dat); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 1 | my ($len) = $self->{'Length'}->val; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 1 | $self->{' stream'} = ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 1 | ▶ | if (defined $self->{'Filter'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | foreach $f ($self->{'Filter'}->elementsof) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | my ($temp) = "Text::PDF::" . $f->val; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | push(@filts, $temp->new()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 1 | $last = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 1 | ▶ | if (defined $self->{' streamfile'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | unlink ($self->{' streamfile'}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | $self->{' streamfile'} = undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 1 | seek ($fh, $self->{' streamloc'}, 0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 1 | ▶ | for ($i = 0; $i < $len; $i += 4096) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 1 | ▶ | if ($i + 4096 > $len) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | 1 | $last = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 1 | read($fh, $dat, $len - $i); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | { read($fh, $dat, 4096); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 1 | foreach $f (@filts) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | { $dat = $f->infilt($dat, $last); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 1 | ▶ | if (!$force_memory && !defined $self->{' streamfile'} && ((length($self->{' stream'}) * 2) > $mincache)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
not $force_memory || defined $self->{" streamfile"} and length($self->{" stream"}) * 2 > $Text::PDF::Dict::mincache
$force_memory || defined $self->{' streamfile'}
MC/DC0%0/3
not $force_memory || defined $self->{" streamfile"} and length($self->{" stream"}) * 2 > $Text::PDF::Dict::mincache
$force_memory
defined $self->{' streamfile'}
length($self->{" stream"}) * 2 > $Text::PDF::Dict::mincache
Truth table25%1/4
not(A || B) and C
A= $force_memoryB= defined $self->{' streamfile'}C= length($self->{" stream"}) * 2 > $Text::PDF::Dict::mincache
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | ▶ | open (DICTFH, ">$tempbase") || next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | binmode DICTFH; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | $self->{' streamfile'} = $tempbase; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | $tempbase =~ s/-(\d+)$/"-" . ($1 + 1)/oe; # prepare for next use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | print DICTFH $self->{' stream'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | undef $self->{' stream'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 1 | ▶ | if (defined $self->{' streamfile'}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | { print DICTFH $dat; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 1 | { $self->{' stream'} .= $dat; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 1 | ▶ | close DICTFH if (defined $self->{' streamfile'}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 1 | $self->{' nofilt'} = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 1 | $self; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | =head2 $d->val | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | Returns the dictionary, which is itself. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | =cut | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | sub val | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 1 | ▶ | { $_[0]; } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
val: called CC=1 SCAR=0.0
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | =head2 $d->copy($inpdf, $res, $unique, $outpdf, %opts) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | Copies an object. See Text::PDF::Objind::Copy() for details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | =cut | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | sub copy | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | my ($self, $inpdf, $res, $unique, $outpdf, %opts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
copy: not called CC=7 SCAR=40.3
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | my ($k, $path); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | $res = $self->SUPER::copy($inpdf, $res, $unique, $outpdf, %opts); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | $path = delete $opts{'path'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | foreach $k (keys %$self) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | ▶ | next if $self->dont_copy($k); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | ▶ | next if defined $res->{$k}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | ▶ | if (UNIVERSAL::can($self->{$k}, "is_obj")) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | ▶ | if (grep {"$path/$k" =~ m|$_|} @{$opts{'clip'}}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | { $res->{$k} = $self->{$k}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | { $res->{$k} = $self->{$k}->realise->copy($inpdf, undef, $unique ? $unique + 1 : 0, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | $outpdf, %opts, 'path' => "$path/$k"); } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | else | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | { $res->{$k} = $self->{$k}; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | $res; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||