#!/usr/bin/perl # use strict; use CGI; my $cgi=new CGI; print $cgi->header; use HTML::HTMLDoc; my $htmldoc = new HTML::HTMLDoc(); $htmldoc->set_html_content('A PDF file'); # $htmldoc->set_input_file("/public_html/voslegal/legal/transactionactive/joselawfirm/transactionactive/independent-case/documents/temp.html"); # alternative to use a present file from your fs my $pdf = $htmldoc->generate_pdf(); print $pdf->to_string(); $pdf->to_file('/vos/spain/newpdfdoc.pdf');