You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jim Willis <sj...@yahoo.com> on 2002/04/05 14:39:42 UTC

Re: PDF generation (fwd)

I have had a tremendous amount of success with htmldoc. see: 
http://www.easysw.com/htmldoc/ (it's gpl'd and has fairly decent 
documentation).
not a module, but can be easily called from cgi-bin, etc and handles 
formatting really well. you design your output in html and pass it to 
htmldoc and out comes a pdf.
good luck
jim willis

>
>---------- Forwarded message ----------
>Date: Wed,  3 Apr 2002 15:43:39 -0500
>From: Bill McCabe <df...@attbi.com>
>To: modperl <mo...@apache.org>
>Subject: PDF generation
>
>Hi All
>
>I have a large number of mod_perl modules that connect to various 
>databases and
>generate workflow performance reports for my organization. I give the users 3
>output options: HTML, Excel (Spreadsheet::WriteExcel), and PDF. For PDF output
>I've been using PDF::Create, which has been at version .01 since 1999. It has
>worked flawlessly for my purposes for a couple of years, but is very 
>limited. In
>fine form-follows-function fashion, the end users would now like the 
>PDF output
>gussied up with graphics, etc. Does anyone have any strong (positive or
>negative) recommendations for which module(s) I should migrate to?
>
>
>TIA,
>Bill


-- 

bug I think.

Posted by Michael Robinton <mi...@bizsystems.com>.
Apache/1.3.22 Ben-SSL/1.47 (Unix) DAV/1.0.3 mod_perl/1.26


The function

getservbyport

causes Apache to segfault

when run from a terminal or as a normal cgi script it works fine
when run with mod_perl it crashes.

sample cgi is the part commented out.

#!/usr/bin/perl

my $proto = 'tcp';
my $proto = 'tcp';

my $name = getservbyport($port, $proto);

#print <<EOF;
#Content-type: text/html
#
#<html><body bgcolor="#ffffff">
#$port, $name
#</body>
#</html>
#EOF

use Apache;
my $r = Apache->request;

my $html = q|<html>
<body bgcolor="#ffffff">
$port, $name
</body>
</html>
|;

$_ = length($html);
$r->status(200);
$r->content_type("text/html");
$r->header_out("Content-length","$_");
$r->send_http_header;
$r->print ($html);
return 200;           # HTTP_OK