[freeside] HTML invoice?
Derek Billingsley
optigold at geeknet.ca
Tue Aug 5 01:13:21 PDT 2003
In another project I'm working on, I used a great Perl module PDF::API2
to build PDF's of invoices.
This is handy because you can convert your existing stationary to PDF
and import it and use it as the basis of your invoice:
## Open the generic invoice
$generic = $base_dir . "/generic_template.pdf";
$pdf=PDF::API2->open($generic);
$page = $pdf->openpage;
Then you go about positioning text to print on the page. I wrote a
function that sets up the fonts and writes a text box to a point on the
page:
printto(300, 590, 10, "black", 0, 1, "Mailing Address (if different)");
, where:
sub printto {
($x, $y, $fontsize, $color, $underline, $bold, $text) = @_;
if ($bold == 0) {
$txt->font($f1, $fontsize);
} else {
$txt->font($f1bold, $fontsize);
}
$txt->translate($x, $y);
if ($underline == 1) {
$txt->text($text, -color=>[$color], -underline=>0);
} else {
$txt->text($text, -color=>[$color]);
}
}
API2 gives you a lot more capability that I only barely use - using
line-art on a part, importing images to place on the PDF, ..
I haven't really dug into Freeside that deeply yet - I wanted to start
using it as a front-end to Plesk but I would need to run a separate
postgres instance in order to service the database requests. Anyone out
there interface Freeside with Plesk yet? Or have I just discovered
another hobby :)
Derek
-----Original Message-----
From: Nicholas Moline [mailto:n.moline at wcwireless.net]
Sent: 05 August 2003 06:20
To: ivan-freeside at sisd.com; Rob Charles
Subject: Re: [freeside] HTML invoice?
this is a feature I was hoping for as well, but with a step further, I
was hoping to be able to use the html2ps program to convert the html to
postscript to print the more stylized results on a postscript enabled
printer.
----- Original Message -----
From: Rob <mailto:rob at thehostmasters.com> Charles
To: ivan-freeside at sisd.com
Sent: Monday, August 04, 2003 8:06 PM
Subject: [freeside] HTML invoice?
Is it possible to send HTML invoices rather than plain Jane ones? I was
looking around and it seems whatever send the email invoices does not
put/include the content type or mine type in the email headers.
I suppose if I new what cgi or perl module or whatever file had the
headers in it I could add it myself. Since there is a choice for the
welcome message I figure there should be an option for invoices too ,
no?
Thanks a bunch...
Rob Charles
TheHostMasters
Montreal, Canada
514-846-0006
Rob at TheHostMasters.com
http://www.TheHostMasters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://420.am/pipermail/freeside-users/attachments/20030805/bf541974/attachment.htm
More information about the freeside-users
mailing list