- Timestamp:
- 2003-04-08T12:25:08+12:00 (21 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/gsConvert.pl
r3933 r4103 60 60 my $use_strings; 61 61 my $pdf_complex; 62 my $pdf_nohidden; 62 63 my $pdf_zoom; 63 64 my $pdf_ignore_images; … … 75 76 print STDERR "\t-use_strings\tuse strings to extract text if conversion fails\n"; 76 77 print STDERR "\t-pdf_complex\tuse complex output when converting PDF to HTML\n"; 78 print STDERR "\t-pdf_nohidden\tDon't attempt to extract hidden text from PDF files\n"; 77 79 print STDERR "\t-pdf_ignore_images\tdon't attempt to extract images when\n"; 78 80 print STDERR "\t\tconverting PDF to HTML\n"; … … 99 101 'use_strings', \$use_strings, 100 102 'pdf_complex', \$pdf_complex, 103 'pdf_nohidden', \$pdf_nohidden, 101 104 'pdf_zoom/\d+/2', \$pdf_zoom 102 105 )) … … 642 645 $cmd .= " -c" if ($pdf_complex); 643 646 $cmd .= " -i" if ($pdf_ignore_images); 647 $cmd .= " -hidden" unless ($pdf_nohidden); 644 648 $cmd .= " \"$input_filename\" \"$output_filestem\""; 645 649 -
trunk/gsdl/bin/script/pdftohtml.pl
r3720 r4103 51 51 "\t-a\tallow images only (continue even if no text is present)\n", 52 52 "\t-c\tproduce complex output (requires ghostscript)\n", 53 "\t-hidden\tExtract hidden text\n", 53 54 "\t-zoom\tfactor by which to zoom the PDF (only useful if -c is set)\n" 54 55 ); … … 58 59 sub main { 59 60 my (@ARGV) = @_; 60 my ($allow_no_text, $ignore_images, $complex, $zoom );61 my ($allow_no_text, $ignore_images, $complex, $zoom, $hidden); 61 62 62 63 # read command-line arguments so that … … 66 67 'i', \$ignore_images, 67 68 'c', \$complex, 69 'hidden', \$hidden, 68 70 'zoom/\d+/2', \$zoom, 69 71 )) … … 115 117 $cmd .= " -i" if ($ignore_images); 116 118 $cmd .= " -c" if ($complex); 119 $cmd .= " -hidden" if ($hidden); 117 120 $cmd .= " -zoom $zoom"; 118 121 $cmd .= " -noframes -p -enc UTF-8 \"$input_filename\" \"$output_filestem.html\""; -
trunk/gsdl/perllib/plugins/PDFPlug.pm
r3833 r4103 45 45 'type' => "flag" }, 46 46 { 'name' => "complex", 47 'desc' => "Create more complex output. With this option set the output html will look much more like the original PDF file. For this to function properly you Ghostscript installed (for *nix gs should be on your path while for windows you must have gswin32c.exe on your path).", 47 'desc' => "Create more complex output. With this option set the output html will look much more like the original PDF file. For this to function properly you Ghostscript installed (for *nix gs should be on your path while for windows you must have gswin32c.exe on your path).", 48 'type' => "flag" }, 49 { 'name' => "nohidden", 50 'desc' => "Prevent pdftohtml from attempting to extract hidden text. This is only useful if the -complex option is also set.", 48 51 'type' => "flag" }, 49 52 { 'name' => "zoom", … … 60 63 my $class = shift (@_); 61 64 62 my ($noimages, $complex, $zoom, $use_sections );65 my ($noimages, $complex, $zoom, $use_sections, $nohidden); 63 66 64 67 if (!parsargv::parse(\@_, … … 66 69 q^complex^, \$complex, 67 70 q^zoom/\d+/2^, \$zoom, 71 q^nohidden^, \$nohidden, 68 72 q^use_sections/1?/^, \$use_sections, 69 73 "allow_extra_options")) { … … 97 101 $self->{'convert_options'} = "-pdf_zoom $zoom"; 98 102 $self->{'convert_options'} .= " -pdf_complex" if $complex; 103 $self->{'convert_options'} .= " -pdf_nohidden" if $nohidden; 99 104 $self->{'convert_options'} .= " -pdf_ignore_images" if $noimages; 100 105 … … 122 127 print STDERR " gs should be on your path while for windows\n"; 123 128 print STDERR " you must have gswin32c.exe on your path).\n"; 129 print STDERR " -nohidden Prevent pdftohtml from attempting to extract\n"; 130 print STDERR " hidden text. This is only useful if the -complex\n"; 131 print STDERR " option is also set."; 124 132 print STDERR " -zoom The factor by which to zoomthe PDF for output\n"; 125 133 print STDERR " (this is only useful if -complex is set).\n\n";
Note:
See TracChangeset
for help on using the changeset viewer.