Leser: 1
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl
use strict;
use warnings;
use HTML::HTMLDoc;
my $htmldoc = new HTML::HTMLDoc();
my $filename = $ARGV[0];
print $filename."\n";
#$htmldoc->set_html_content(qq~<html><body>A PDF file</body></html>~);
$htmldoc->set_input_file($filename); # alternative to use a present file from your fs
$htmldoc->set_output_format("pdf14");
$htmldoc->set_charset("iso-8859-1");
$htmldoc->set_compression(1);
$htmldoc->links();
$htmldoc->set_pagemode("document");
$htmldoc->set_browserwidth(680);
my $pdf = $htmldoc->generate_pdf();
$pdf->to_file('foo.pdf');
print $htmldoc->error();
7 Einträge, 1 Seite |