We don't bite newbies here... much | |
PerlMonks |
PDF::Create - send output to STDOUT?by George_Sherston (Vicar) |
on Jun 04, 2002 at 08:50 UTC ( [id://171430]=perlquestion: print w/replies, xml ) | Need Help?? |
George_Sherston has asked for the wisdom of the Perl Monks concerning the following question:
I'm using PDF::Create to make on-the-fly pdfs as part of a CGI application. It works fine, but only because I have bodged up a crude alteration to the add function in Create.pm. The original function is:
This does one of two things with any new bit of data: either it prints it to a previously opened file handle, or it stores it in the pdf object for, AFAIK ultimate dumping to... filehandle? (not sure - I'm afraid the close sub is a bit beyond me - it seems to call itself from within itself, though I'm sure there's more to it than that). In any event, this creates PDF files ok, but I want it to send the PDF data to the web browser. The only way I could find to do that is to install a local copy of the module and alter it to Now it works (I include a pdf header in my script) - the pdf appears straight on the browser screen as desired, with no intermediate saving and retrieving. BUT this is obviously a BAD THING (tm) from the point of view of portability and future generations. So my question is whether any monk knows how I can achieve my aim without editing the module. I'd have thought it wd be a thing people wanted to do, so wd probably be possible. But I've tried:
I'd be most grateful for any light sibling monks can shed on this. § George Sherston
Back to
Seekers of Perl Wisdom
|
|