Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: XML2PDF

by the_0ne (Pilgrim)
on Jul 03, 2001 at 08:42 UTC ( #93410=note: print w/ replies, xml ) Need Help??


in reply to XML2PDF

I finally find somebody that is using pdflib also. We've used this module for over 2 1/2 years on a pretty large shipping company's site. Back then there was no real pdf perl module, so pdflib was what we used. It was pretty easy and very stable. In fact, so stable, that we're still using version 2.0 and they're now up to 4.x. No sense changing what isn't broken.

Thanks for the node.

Update

Forgot to mention the use of XML is great. Starting to make me rethink our site design now. :)


Comment on Re: XML2PDF
Re: Re: XML2PDF
by earthboundmisfit (Chaplain) on Jul 03, 2001 at 21:44 UTC
    I've been using it as well and while it has really saved us tons in development time it doesn't have or do everything we need.

    Anyone interested in PDF document dispatch might also wish to check out HTMLDOC It can be called in a Perl script using system. I use a homegrown templating routine to generate an RG authorization complete with tabular layout, store it temporaily as HTML from a MySQL table, and then pass the temp file name to HTMLDOC and poof! instant PDF file ready for faxing. It's even easier than PDFLib. Here's a fragment from an actual app

    our $template; &template_fun; $template =~ s/\#([^\#])\#/${$1}/ge; # see update note my $tmstamp = localtime; $tmstamp =~s/ |:|-/_/g; my $tmpfile = "D:\\pdfs\\" . $tmstamp . ".html"; open (HTMLFILE, ">$tmpfile") || die "cannot do it: $!"; print HTMLFILE "$template"; close(HTMLFILE); ## here's where we make the actual system call chdir "D:\\HTMLDOC\\"; system("htmldoc -t pdf --webpage -f D:\\pdfs\\" . $RGA_num . ".pdf $tm +pfile"); unlink $tmpfile; sub template_fun(){ $template = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <center>Returned Goods Authorization</center> <TABLE border=0 width=595> <TR> <TD width=85 valign=top> <P> <IMG SRC="D:\inetpub\wwwroot\images\D2.jpg" ALIGN=left><BR cle +ar=all> </TD> <TD width=450 valign=top><H2>#companyName#<BR> <font size=-2>#ourphone# #ourfax#</font></H2> </TD> </TR> <TR> <TD width=85>&nbsp;</TD> <TD width=450> <TABLE BORDER=0 width=350> <TR> <TD valign=top>To: #attn#<BR> Company: #cust_name#<BR> Phone: #phone#<BR> #dmethod#: #fax# </TD> <TD valign=top>From: #tech#<BR> Fax back: #our_fax#<BR> Reason for return: #code#<BR> Date: #date#<BR> Order number: #ord_num# </TD> </TR> </TABLE><P> <font size=+1>RGA number: #RGA_num#</font> <font size=2>(Write thi +s number on the outside of your package)</font> #raddress# </TD> </TR> </TABLE> </BODY> </HTML>'; }
    # Update: just read Death to Dot Star!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://93410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-07-28 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (209 votes), past polls