Changeset 3833 for trunk/gsdl/perllib
- Timestamp:
- 2003-03-10T15:44:08+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/PDFPlug.pm
r3720 r3833 60 60 my $class = shift (@_); 61 61 62 my ($noimages, $complex, $zoom );62 my ($noimages, $complex, $zoom, $use_sections); 63 63 64 64 if (!parsargv::parse(\@_, … … 66 66 q^complex^, \$complex, 67 67 q^zoom/\d+/2^, \$zoom, 68 q^use_sections/1?/^, \$use_sections, 68 69 "allow_extra_options")) { 69 70 … … 73 74 } 74 75 76 77 my @args=@_; 78 if ($use_sections) { 79 push (@args, "-description_tags"); 80 } 81 75 82 # following title_sub removes "Page 1" added by pdftohtml, and a leading 76 83 # "1", which is often the page number at the top of the page. Bad Luck 77 84 # if your document title actually starts with "1 " - is there a better way? 78 85 79 my @args=();80 my $use_sections=0;81 while ($#_ > -1) {82 my $arg=shift(@_);83 if ($arg =~ /^\-use_sections/) {84 $use_sections=1;85 # in case someone put "-use_sections 1"86 $arg=shift(@_);87 if (defined($arg) && $arg ne "1") {88 push(@args, $arg);89 }90 push(@args, "-description_tags"); # so HTML uses sections...91 push(@args, @_); # any other args to PDFPlug...92 @_=();93 last;94 } else {95 push(@args, $arg);96 }97 }98 86 my $self = new ConvertToPlug ($class, @args, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 87 99 88 if ($use_sections) { 100 89 $self->{'use_sections'}=1; 101 90 } 91 102 92 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 103 93 my $option_list = $self->{'option_list'}; … … 153 143 sub process { 154 144 my $self = shift (@_); 155 156 145 if ($self->{'use_sections'} 157 146 && $self->{'converted_to'} eq "HTML") {
Note:
See TracChangeset
for help on using the changeset viewer.