http://www.perlmonks.org?node_id=566616

jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:

I'm having a problem with a script which uses PDF::FromHTML. My provider says it is a problem on the script - I don't think so!

I wondered if some kind person would take a look and either let me know ther error of my ways, or give me the courage to face up to my provider...

Thanks

#!/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";

Gives the error:

Can't locate pdflib_pl.pm in @INC (@INC contains:/usr/local/lib/perl5/5.8.2/i386-freebsd /usr/local/lib/perl5/5.8.2 /usr/local/lib/perl5/site_perl/5.8.2/i386-freebsd
/usr/local/lib/perl5/site_perl/5.8.2 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.8.2/PDF/Template.pm line 13.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.2/PDF/Template.pm line 13.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.2/PDF/FromHTML.pm line 20.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.2/PDF/FromHTML.pm line 20.
Compilation failed in require at pdf1.pl line 5.
BEGIN failed--compilation aborted at pdf1.pl line 5.

Update: I just wanted to give a heads up on the outcome of this. I have discovered that PDF::Template is the 'culprit' in all this, requiring pdflib_pl, though the next version is promised to include PDF::API2. My provider has kindly installed pdflib_pl Lite and I shall have to test to see how restrictive that is...