Leser: 26
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
27
PDF-FromHTML marked for install
PDF-FromHTML depends on Image-Size
PDF-FromHTML depends on XML-Twig
PDF-FromHTML depends on Graphics-ColorNames
PDF-FromHTML depends on Scalar-List-Utils
PDF-FromHTML depends on PDF-Writer
Installing 6 packages ...
Downloading PDF-FromHTML-0.31 ... done
Downloading Image-Size-3.220 ... done
Downloading XML-Twig-3.32 ... done
Downloading Graphics-ColorNames-2.11 ... done
Downloading Scalar-List-Utils-1.22 ... done
Downloading PDF-Writer-0.06 ... done
Unpacking PDF-FromHTML-0.31 ... done
Unpacking Image-Size-3.220 ... done
Unpacking XML-Twig-3.32 ... done
Unpacking Graphics-ColorNames-2.11 ... done
Unpacking Scalar-List-Utils-1.22 ... done
Unpacking PDF-Writer-0.06 ... done
Generating HTML for PDF-FromHTML-0.31 ... done
Generating HTML for Image-Size-3.220 ... done
Generating HTML for XML-Twig-3.32 ... done
Generating HTML for Graphics-ColorNames-2.11 ... done
Generating HTML for Scalar-List-Utils-1.22 ... done
Generating HTML for PDF-Writer-0.06 ... done
Updating files in site area ... done
Installing 6 packages done
1
2
3
4
5
6
7
8
<html>
<head>
<title>testpdf.html</title>
</head>
<body>
<p>Testseite</p>
</body>
</html>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl -w use strict; use warnings; use PDF::FromHTML; my $pdf = PDF::FromHTML->new( encoding => 'utf-8' ); # Loading from a file: $pdf->load_file('testpdf.html'); # Perform the actual conversion: $pdf->convert( # With PDF::API2, font names such as 'traditional' also works Font => 'ariali.ttf', LineHeight => 10, Landscape => 1, ); # Write to a file: $pdf->write_file('testpdf.pdf');
1
2
C:\Arbeit>perl testpdf.pl
Undefined subroutine &PDF::FromHTML::HAS_HTML_TIDY called at C:/Perl/site/lib/PDF/FromHTML.pm line 124.
No supported PDF backends found! at C:/Perl/site/lib/PDF/Writer.pm line 28.