Changeset 8218 for trunk/gsdl/perllib/plugins/PDFPlug.pm
- Timestamp:
- 2004-10-05T12:39:06+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/PDFPlug.pm
r8170 r8218 27 27 28 28 use ConvertToPlug; 29 use unicode; 29 30 30 31 sub BEGIN { … … 139 140 my $outhandle=$self->{'outhandle'}; 140 141 142 my $textref=$_[0]; 143 141 144 if ($self->{'use_sections'} 142 145 && $self->{'converted_to'} eq "HTML") { 143 146 144 147 print $outhandle "PDFPlug: Calculating sections...\n"; 145 my $textref=$_[0];146 148 147 149 # we have "<a name=1></a>" etc for each page … … 196 198 } 197 199 200 # turn any high bytes that aren't valid utf-8 into utf-8. 201 unicode::ensure_utf8($textref); 202 198 203 print $outhandle "PDFPlug: passing $_[3] on to $self->{'converted_to'}Plug\n" 199 204 if $self->{'verbosity'} > 1; … … 215 220 216 221 # Add NumPages metadata (we have "<a name=1>" etc for each page) 217 my $textref = $_[0];218 222 my @pages = ($$textref =~ /\<a name=\d+\>/ig); 219 223 $doc_obj->add_utf8_metadata($cursection, "NumPages", scalar(@pages));
Note:
See TracChangeset
for help on using the changeset viewer.