#Add Module..
use PDF::FromHTML;
#Create object for that Module..
my $pdf = new PDF::FromHTML( encoding => 'utf-8' );
# Loading from a file..
$pdf->load_file('source.htm');
# Or from a scalar reference:
#$input = "<html><body>sample test<br><b>deiveegan</b></
body></html>";
# $pdf->load_file(\$input);
# Perform the actual conversion..
$pdf->convert(
Font => 'arial.ttf',
LineHeight => 18,
Landscape => 2,
);
# Write to a file:.
$pdf->write_file('Target.pdf') ;
# Or to a scalar reference:
# $pdf->write_file(\$output);
use PDF::FromHTML;
#Create object for that Module..
my $pdf = new PDF::FromHTML( encoding => 'utf-8' );
# Loading from a file..
$pdf->load_file('source.htm');
# Or from a scalar reference:
#$input = "<html><body>sample test<br><b>deiveegan</b></
# $pdf->load_file(\$input);
# Perform the actual conversion..
$pdf->convert(
Font => 'arial.ttf',
LineHeight => 18,
Landscape => 2,
);
# Write to a file:.
$pdf->write_file('Target.pdf')
# Or to a scalar reference:
# $pdf->write_file(\$output);
2 comments:
That actually is conversion from html to pdf (the opposite i the title).
Post a Comment