Thanks, I'll give it a look C. 2012/4/28 > > Code examples for PHP could be a second choice. > > I don't have a line on any off the shelf FOSS applications, although I > bet there is something out there. I use a PHP script to generate a > monthly report as a PDF. > > I use a PDF class for PHP but it appears it has been updated since I > downloaded it many moons ago. It looks to be at http://ros.co.nz/pdf/ > but mine relies on fpdf, which also seems to be around, but it looks > like the current version doesn't. So my examples might not be all > that useful. > > I was going to include the stuff I use but the zip is a bit large for > this list. Besides the actual class there are a few fonts which take > plenty of space. > > I've attached a sample which I've hacked up some. I use this monthly > to generate a report. I've taken important bits from the include > files and pasted them into it, and left out uninteresting functions. > Kinda grunty and maybe hard to follow, but it should contain an > example of almost everything you might want to do. > > I assume you know how to do the database stuff. > > For the PDF > > $PageSize =3D array(0,0,$Page_Width,$Page_Height); > $pdf =3D & new Cpdf($PageSize); > $pdf->SetTextColor(0,0,0); > $pdf->selectFont('helvetica-Bold'); > $FontSize=3D18; > > $pdf->addText($XPos,$YPos,$FontSize,_('blah, blah, blah')); > // and do that a bunch of times > > then > > $buf =3D $pdf->output(); > $len +=3D strlen($buf); > > header('Content-type: application/pdf'); > header('Content-Length: ' . $len); > header('Content-Disposition: inline; filename=3D' . $DateShort . > '-rpt.pdf'); > header('Expires: 0'); > header('Cache-Control: must-revalidate, post-check=3D0, pre-check=3D0'); > header('Pragma: public'); > > $pdf->stream() > > ?> > > Yeah, all the text positioning can get kinda grody, but it does work. > The example has functions for a new page, header, etc. > > Hope that helps. > > --McD > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .