[Cialug] pdf thing (again)

Dave J. Hala Jr. dave at 58ghz.net
Thu Nov 9 10:24:40 CST 2006


I did manage to find a book called "PDF HACKS" from O'reilly. (isbn
0-596-00655-1) While this book doesn't go into too much detail about
anything, it does cover alot of the stuff that is available for both
Windows and Linux. It also has some code samples. 

It's handy dandy as a quick and dirty reference.

:) Dave
On Fri, 2006-11-03 at 16:33, Barry Von Ahsen wrote:
> agreed - it took me 4-5 hours to get the w9 form laid out correctly
> 
> -barry
> 
> 
> Dave J. Hala Jr. wrote:
> > I hate to say it, but designing the forms on a windows box using acrobat
> > pro, was pretty easy. I'd never used it before and it only took me a few
> > minutes to figure it out. At moment, I'd say that is definitely the way
> > to design/create the pdf forms.
> > 
> > I like the control that you have with ezpdf, but I don't think that
> > designing my forms that way will be cost effective as my forms are 
> > fairly complex.
> > 
> > 
> > 
> > On Fri, 2006-11-03 at 09:41, David Champion wrote:
> >> We've used both ezpdf and pdf-lib. Not ironically, ezpdf is easier to 
> >> work with. But setting up large / complex forms is still a pain.
> >>
> >> At least the tool that DH is using lets you design the forms in a GUI.
> >>
> >> -dc
> >>
> >> Barry Von Ahsen wrote:
> >>> we use ezpdf (http://www.ros.co.nz/pdf/) here at work to generate 
> >>> contracts and w9 forms from database data.  the initial setup of a form 
> >>> can be a bit difficult (you can pixel position everything, if you wanted 
> >>> to), but the price is perfect :)
> >>>
> >>> -barry
> >>>
> >>> (some sample code)
> >>> include_once('class.ezpdf.php');
> >>> $pdf = new Cezpdf('letter','portrait');
> >>> $pdf->ezSetMargins(43,30,30,50);
> >>> $bf_size = 12;
> >>>
> >>> $mainFont =  '/fonts/Helvetica.afm';
> >>> $pdf->selectFont($mainFont);
> >>>     
> >>> // SET DOCUMENT INFO
> >>> $pdf->addInfo('Title', 'My PDF');
> >>> $pdf->addInfo('Subject', 'Test');
> >>> $pdf->addInfo('Author', 'Me');
> >>> $pdf->addInfo('Producer', 'Myself');
> >>> $pdf->addInfo('CreationDate', date("m/d/Y h:i:s A") );
> >>>
> >>> $txt = "This is a paragraph\n";
> >>> $pdf->ezText($txt,$bf_size,array('justification'=>'left'));
> >>>     
> >>> $txt = "Your name is: " . $database_variable . "\n";
> >>> $pdf->ezText($txt,$bf_size,array('justification'=>'left'));
> >>>
> >>> if($stream) {
> >>>     $pdf->ezStream();
> >>> } else {
> >>>     $pdfcode = $pdf->ezOutput();
> >>>     $fh = fopen("/path/to/pdf",rb);
> >>>     fwrite($fh, $pdfcode);
> >>> }
> >>>
> >>>
> >>> Dave J. Hala Jr. wrote:
> >>>> Basically what I did when trying out pdf-tools' form filling tool was to
> >>>> load the pdf form into acrobat professional. Then I defined the data
> >>>> fields and saved the form.
> >>>>
> >>>> To fill the form, I read the data from the database, and passed the
> >>>> information to the form filling tool on the command line. Their tool
> >>>> took the original pdf and the data and created a new, filled out pdf. It
> >>>> was slick and it worked well. Smoking fast, with almost no overhead.
> >>>>
> >>>> I'm not against forking out $2k for pdf-tools's software. However, I
> >>>> have all dual cpu machines and possibly a quad coming in the future.
> >>>> That will raise my licensing fees considerably. Don't get me wrong,
> >>>> pdf-tools is well worth the money and they have excellant support.
> >>>> However, if I can find a lower cost alternative, I could be more
> >>>> competitive.
> >>>>
> >>>> :) Dave
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Fri, 2006-11-03 at 07:42, carl-olsen at mchsi.com wrote:
> >>>>> From what I see, it looks like it would be possible to build the FDF
> >>>>> file using PHP and data from a database.  I'm not too familiar with
> >>>>> running command line instructions using PHP, but I'm sure that its not
> >>>>> difficult.  I'm wondering if I can create the form using Acrobat and
> >>>>> then use this tool to fill in the form fields, or whether the PDF has
> >>>>> to be created using this tool.  I know how to create a form with fill
> >>>>> in fields using Acrobat, but I'd be lost if I had to create one from a
> >>>>> command line.
> >>>>>
> >>>>>  
> >>>>>
> >>>>> I know how to capture form fields from a PDF and put the data into a
> >>>>> database, but I never could figure out how to populate the fields from
> >>>>> the database later when I wanted to print out a copy of a form that
> >>>>> someone filled out using a web browser.  The options I found at that
> >>>>> time were very expensive.  I looked at the IRS website and found the
> >>>>> tool they were using was about half the price of the Adobe tools, but
> >>>>> it was still several thousand dollars.
> >>>>>
> >>>>>  
> >>>>>
> >>>>> Carl Olsen
> >>>>>
> >>>>> Web Developer
> >>>>>
> >>>>> Drake University
> >>>>>
> >>>>>
> >>>>>         -------------- Original message from "Dave J. Hala Jr."
> >>>>>         <dave at 58ghz.net>: --------------                         > 
> >>>>> I've been experimenting with a trial version of PDF Tools
> >>>>>         form filling         > tool. (www.pdf-tools.com) It takes an 
> >>>>> existing pdf, and
> >>>>>         allows you to         > insert data into the form fields in 
> >>>>> the pdf.         >         > It works awesome. However, its priced by 
> >>>>> CPU. This makes it
> >>>>>         a little         > pricey on a dual cpu server or a dual core 
> >>>>> server. I'm
> >>>>>         looking for a         > lower cost alternative.         > 
> >>>>>         > I found something called pdftk or PDF Toolkit         >
> >>>>>         
> >>>>> http://applications.linux.com/article.pl?sid=06/04/17/1943230&tid=47
> >>>>>         >         > It seems to be the solution I'm looking for. Has 
> >>>>> anyone had
> >>>>>         any         > experience with it before? 
> >>> _______________________________________________
> >>> Cialug mailing list
> >>> Cialug at cialug.org
> >>> http://cialug.org/mailman/listinfo/cialug
> >>>
> >>
> >> _______________________________________________
> >> Cialug mailing list
> >> Cialug at cialug.org
> >> http://cialug.org/mailman/listinfo/cialug
> 
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
-- 

Open Source Information Systems, Inc. (OSIS)
Dave J. Hala Jr., President <dave at osis.us>
641.485.1606 www.osis.us
Save a life: Adopt a shelter animal!



More information about the Cialug mailing list