[ic] Problems generating PDF:s on the fly with HTML::HTMLDoc

Rene Hertell interchange at hertell.com
Thu Nov 27 11:12:45 EST 2003

> I have been trying to create an usertag that would return a PDF 
> on-the-fly (by using HTMLDoc and the HTML::HTMLDoc CPAN module). 
> My problem is that I can't get this script to work within IC. It 
> works perfectly when I run it from a separate Perl-script, but 
> running it as an usertag creates only an empty file (0 bytes) or 
> returns nothing.

I forgot to add the piece of code I have for now:

UserTag generate-pdf addAttr
UserTag generate-pdf Routine <<EOF
sub {
  require HTML::HTMLDoc;
  my $htmldoc = new HTML::HTMLDoc(mode=>'file');
  $htmldoc->set_html_content(qq~<html><body>A PDF file</body></html>~);
  my $pdf = $htmldoc->generate_pdf();


More information about the interchange-users mailing list