#!/usr/bin/perl -w use PDF::FromHTML; my $pdf = PDF::FromHTML->new( encoding => 'utf-8' ); $pdf->load_file('source.html'); $pdf->convert; $pdf->write_file('target.pdf'); print "Content-type: text/html\n\n"; print "done";