Skip Menu |

This queue is for tickets about the CAM-PDF CPAN distribution.

Report information
The Basics
Id: 83698
Status: open
Priority: 0/
Queue: CAM-PDF

People
Owner: Nobody in particular
Requestors: dougp [...] prostyle.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug in CAM::PDF
Date: Thu, 28 Feb 2013 16:53:31 -0800
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Doug Poulin" <dougp [...] prostyle.com>
I'm new to running CAM::PDF (having just downloaded it off CPAN) but I've been searching for a PDF form filler I can run inside a perl script and yours fit's the bill nicely. I have a very simple pdf that I'm testing with and a very short perl script. The code I'm running is: $cam = CAM::PDF->new("testform.pdf"); (@fields) = $cam->getFormFieldList(); $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); $cam->save(); $cam->output("refer_$phn.pdf"); Testform is a 1.4 version pdf file with three fields. @fields contains name, phn and email after the getFormFieldList command. The error I get is: main::(referral2.cgi:408): $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); DB<3> n Could not find resource /HeBo while preparing form field name at /usr/lib/perl5/site_perl/5.8.5/CAM/PDF.pm line 4616 CAM::PDF::fillFormFields('CAM::PDF=HASH(0xae7ca44)', 'name', 'Straw, KA', 'phn', 9029821599, 'email', 'straw@medinetmail.ca') called at referral2.cgi line 408 Am I missing something or misusing the product? Any help is appreciated and I hope to get a lot of use out of this. Doug Poulin
Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF
Date: Fri, 1 Mar 2013 07:34:06 -0600
To: bug-CAM-PDF [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
I don't know. That means that CAM::PDF can't create the text to fill in the field because it can't locate that font resource to figure out what font to use for the field. Perhaps the PDF is corrupt, or it's just a type of PDF I haven't come across before... Chris On Feb 28, 2013, at 6:53 PM, dougp via RT <bug-CAM-PDF@rt.cpan.org> wrote: Show quoted text
> Thu Feb 28 19:53:45 2013: Request 83698 was acted upon. > Transaction: Ticket created by dougp@prostyle.com > Queue: CAM-PDF > Subject: bug in CAM::PDF > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: dougp@prostyle.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > > I'm new to running CAM::PDF (having just downloaded it off CPAN) but I've > been searching for a PDF form filler I can run inside a perl script and > yours fit's the bill nicely. > > I have a very simple pdf that I'm testing with and a very short perl script. > The code I'm running is: > $cam = CAM::PDF->new("testform.pdf"); > (@fields) = $cam->getFormFieldList(); > > $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); > $cam->save(); > $cam->output("refer_$phn.pdf"); > > Testform is a 1.4 version pdf file with three fields. @fields contains > name, phn and email after the getFormFieldList command. > > The error I get is: > > main::(referral2.cgi:408): > $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); > > DB<3> n > Could not find resource /HeBo while preparing form field name > at /usr/lib/perl5/site_perl/5.8.5/CAM/PDF.pm line 4616 > CAM::PDF::fillFormFields('CAM::PDF=HASH(0xae7ca44)', 'name', 'Straw, > KA', 'phn', 9029821599, 'email', 'straw@medinetmail.ca') called at > referral2.cgi line 408 > > Am I missing something or misusing the product? > > Any help is appreciated and I hope to get a lot of use out of this. > > Doug Poulin > >
Subject: RE: [rt.cpan.org #83698] bug in CAM::PDF
Date: Fri, 1 Mar 2013 09:36:00 -0800
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Doug Poulin" <dougp [...] prostyle.com>
Would it help if I sent you the pdf? Here it is. It was converted from notepad using the adobe printer conversion with the conversion format set to 1.4 I have adobe acrobat XI, but that updates the pdf to a newer version. So I'm now using CutePdf (there's a free 30 day trial) to create the form. When I add a text field it defaults to Helvetica-bold. I tried it with courier and got the following result. I'm alos including the pdf for you. Could not find resource /Cour while preparing form field name at /usr/lib/perl5/site_perl/5.8.5/CAM/PDF.pm line 4616 CAM::PDF::fillFormFields('CAM::PDF=HASH(0xbacac44)', 'name', 'Straw, KA', 'phn', 9029821599, 'email', 'straw@medinetmail.ca') called at referral2.cgi line 408 Thanks for the quick response. Doug Show quoted text
-----Original Message----- From: Chris Dolan via RT [mailto:bug-CAM-PDF@rt.cpan.org] Sent: Friday, March 01, 2013 5:34 AM To: dougp@prostyle.com Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > I don't know. That means that CAM::PDF can't create the text to fill in the field because it can't locate that font resource to figure out what font to use for the field. Perhaps the PDF is corrupt, or it's just a type of PDF I haven't come across before... Chris On Feb 28, 2013, at 6:53 PM, dougp via RT <bug-CAM-PDF@rt.cpan.org> wrote:
> Thu Feb 28 19:53:45 2013: Request 83698 was acted upon. > Transaction: Ticket created by dougp@prostyle.com > Queue: CAM-PDF > Subject: bug in CAM::PDF > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: dougp@prostyle.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > > I'm new to running CAM::PDF (having just downloaded it off CPAN) but > I've been searching for a PDF form filler I can run inside a perl > script and yours fit's the bill nicely. > > I have a very simple pdf that I'm testing with and a very short perl script. > The code I'm running is: > $cam = CAM::PDF->new("testform.pdf"); > (@fields) = $cam->getFormFieldList(); > > $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); > $cam->save(); > $cam->output("refer_$phn.pdf"); > > Testform is a 1.4 version pdf file with three fields. @fields contains > name, phn and email after the getFormFieldList command. > > The error I get is: > > main::(referral2.cgi:408): > $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); > > DB<3> n > Could not find resource /HeBo while preparing form field name at > /usr/lib/perl5/site_perl/5.8.5/CAM/PDF.pm line 4616 > CAM::PDF::fillFormFields('CAM::PDF=HASH(0xae7ca44)', 'name', > 'Straw, KA', 'phn', 9029821599, 'email', 'straw@medinetmail.ca') > called at referral2.cgi line 408 > > Am I missing something or misusing the product? > > Any help is appreciated and I hope to get a lot of use out of this. > > Doug Poulin > >
Download formadobe.pdf
application/pdf 11.1k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF
Date: Sun, 10 Mar 2013 23:15:19 -0700
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Doug Poulin" <dougp [...] prostyle.com>
Did you receive the pdf I sent you. I was wondering if you'd have some time to look at it? Doug -------------------------------------------------- From: "Chris Dolan via RT" <bug-CAM-PDF@rt.cpan.org> Sent: Friday, March 01, 2013 6:34 AM To: <dougp@prostyle.com> Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > I don't know. That means that CAM::PDF can't create the text to fill in > the field because it can't locate that font resource to figure out what > font to use for the field. Perhaps the PDF is corrupt, or it's just a type > of PDF I haven't come across before... > Chris > > > On Feb 28, 2013, at 6:53 PM, dougp via RT <bug-CAM-PDF@rt.cpan.org> wrote: >
>> Thu Feb 28 19:53:45 2013: Request 83698 was acted upon. >> Transaction: Ticket created by dougp@prostyle.com >> Queue: CAM-PDF >> Subject: bug in CAM::PDF >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: dougp@prostyle.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > >> >> >> I'm new to running CAM::PDF (having just downloaded it off CPAN) but I've >> been searching for a PDF form filler I can run inside a perl script and >> yours fit's the bill nicely. >> >> I have a very simple pdf that I'm testing with and a very short perl >> script. >> The code I'm running is: >> $cam = CAM::PDF->new("testform.pdf"); >> (@fields) = $cam->getFormFieldList(); >> >> $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); >> $cam->save(); >> $cam->output("refer_$phn.pdf"); >> >> Testform is a 1.4 version pdf file with three fields. @fields contains >> name, phn and email after the getFormFieldList command. >> >> The error I get is: >> >> main::(referral2.cgi:408): >> $cam->fillFormFields(name=>$name,phn=>$phn,email=>$patemail); >> >> DB<3> n >> Could not find resource /HeBo while preparing form field name >> at /usr/lib/perl5/site_perl/5.8.5/CAM/PDF.pm line 4616 >> CAM::PDF::fillFormFields('CAM::PDF=HASH(0xae7ca44)', 'name', >> 'Straw, >> KA', 'phn', 9029821599, 'email', 'straw@medinetmail.ca') called at >> referral2.cgi line 408 >> >> Am I missing something or misusing the product? >> >> Any help is appreciated and I hope to get a lot of use out of this. >> >> Doug Poulin >> >>
> > >
Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF
Date: Wed, 13 Mar 2013 20:41:58 -0500
To: bug-CAM-PDF [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
I did now. It looks like it's unsupported. I wrote a comment in the code a really long time ago that says: # Search out font resources. This is a total kluge. # TODO: the right way to do this is to look for the DR # attribute in the form element or it's ancestors. Indeed, your PDF has /Cour specified in the /DR tag of each form object. Chris On Mar 11, 2013, at 1:19 AM, dougp via RT <bug-CAM-PDF@rt.cpan.org> wrote: Show quoted text
> Queue: CAM-PDF > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > Did you receive the pdf I sent you. I was wondering if you'd have some time > to look at it? > > Doug
Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF
Date: Wed, 13 Mar 2013 19:35:12 -0700
To: <bug-CAM-PDF [...] rt.cpan.org>
From: "Doug Poulin" <dougp [...] prostyle.com>
Is it a big deal to fix? I'll tackle it, if you can't but I'm only marginally familiar with the PDF file structure and even less familiar with your code. Your help either in fixing it, or giving me enough help to get me up to speed is appreciated. Doug -------------------------------------------------- From: "Chris Dolan via RT" <bug-CAM-PDF@rt.cpan.org> Sent: Wednesday, March 13, 2013 6:42 PM To: <dougp@prostyle.com> Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > I did now. It looks like it's unsupported. I wrote a comment in the code a > really long time ago that says: > > # Search out font resources. This is a total kluge. > # TODO: the right way to do this is to look for the DR > # attribute in the form element or it's ancestors. > > Indeed, your PDF has /Cour specified in the /DR tag of each form object. > Chris > > > On Mar 11, 2013, at 1:19 AM, dougp via RT <bug-CAM-PDF@rt.cpan.org> wrote: >
>> Queue: CAM-PDF >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > >> >> Did you receive the pdf I sent you. I was wondering if you'd have some >> time >> to look at it? >> >> Doug
> > >
Subject: Re: [rt.cpan.org #83698] bug in CAM::PDF
Date: Thu, 14 Mar 2013 07:49:54 -0500
To: bug-CAM-PDF [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
Probably medium difficulty. I haven't touched that part of the code since roughly 2004, so I'd be starting almost as fresh as you would! I vaguely recall that the form filling logic was a big can of worms and heuristics. Maybe fixing /DR would clean it up... Chris On Mar 13, 2013, at 9:39 PM, "dougp via RT" <bug-CAM-PDF@rt.cpan.org> wrote: Show quoted text
> Queue: CAM-PDF > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83698 > > > Is it a big deal to fix? I'll tackle it, if you can't but I'm only > marginally familiar with the PDF file structure and even less familiar with > your code. Your help either in fixing it, or giving me enough help to get > me up to speed is appreciated. > > Doug