House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Using iText with CFML for PDF forms

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi Guys,
Arsalan Tariq Keen
07/02/09 11:17 A
AcroForm .... the one with ".pdf" extension.
Arsalan Tariq Keen
07/04/09 03:30 A
cfsearching@yahoo.com wrote:
Paul Hastings
07/02/09 12:53 P
Paul Hastings wrote:
Leigh
07/02/09 01:04 P
Yes guys,
Arsalan Tariq Keen
07/02/09 02:12 P
Paul Hastings wrote:
Leigh
07/03/09 10:25 A
:) nice imagination ....
Arsalan Tariq Keen
07/03/09 02:56 P
Arsalan Tariq Keen wrote:
Paul Hastings
07/03/09 11:32 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/02/2009 11:17 AM

Hi Guys, Does anyone has any experience of populating PDF forms using iText. And can we use iText with ColdFusion as well? Regards, Arsalan

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
07/02/2009 11:41 AM

I don't know what iText is, but we've definitely populated PDF forms from Cold Fusion. What are you trying to do, exactly. Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or.  It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged __________ Information from ESET Smart Security, version of virus signature database 4209 (20090702) __________ The message was checked by ESET Smart Security. http://www.eset.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
07/02/2009 11:53 AM

iText is the Java library that powers the cfdocument tag. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ > > I don't know what iText is, but we've definitely populated PDF forms from > Cold Fusion. > > What are you trying to do, exactly.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Alkema
07/02/2009 12:05 PM

I would just use ColdFusion to produce the PDF. Example <cfdocument format="FlashPaper"> <p>This is a document rendered by the    cfdocument tag.</p> </cfdocument> ColdFusion may be using the iText library, but why install the java library on a CF server that already has it. Plus I'm sure using cfdocument is easier to use anyway, and ColdFusion has adapted for the use of ColdFusion inside of it already. :) iText is the Java library that powers the cfdocument tag. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ > > I don't know what iText is, but we've definitely populated PDF forms from > Cold Fusion. > > What are you trying to do, exactly.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Will Swain
07/02/2009 12:10 PM

Cfdocument won't populate pdf form fields I don't think. For that, you need to use cfpdfform, cfpdfsubform and cfpdfformparam. These are very cool tags, which I only recently started using. Will I would just use ColdFusion to produce the PDF. Example <cfdocument format="FlashPaper"> <p>This is a document rendered by the    cfdocument tag.</p> </cfdocument> ColdFusion may be using the iText library, but why install the java library on a CF server that already has it. Plus I'm sure using cfdocument is easier to use anyway, and ColdFusion has adapted for the use of ColdFusion inside of it already. :) iText is the Java library that powers the cfdocument tag. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ > > I don't know what iText is, but we've definitely populated PDF forms from > Cold Fusion. > > What are you trying to do, exactly.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Billy Cox
07/02/2009 12:13 PM

You might use iText if you wanted to use the most recent version. Also, CFDocument obscures the complexity of iText and thus limits functionality that some users might want. I would just use ColdFusion to produce the PDF. Example <cfdocument format="FlashPaper"> <p>This is a document rendered by the    cfdocument tag.</p> </cfdocument> ColdFusion may be using the iText library, but why install the java library on a CF server that already has it. Plus I'm sure using cfdocument is easier to use anyway, and ColdFusion has adapted for the use of ColdFusion inside of it already. :) iText is the Java library that powers the cfdocument tag. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ > > I don't know what iText is, but we've definitely populated PDF forms > from Cold Fusion. > > What are you trying to do, exactly.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jochem van Dieten
07/03/2009 04:46 PM

On Thu, Jul 2, 2009 at 5:16 PM, Arsalan Tariq Keen wrote: > Does anyone has any experience of populating PDF forms using iText. AcroForm or XFA? Jochem -- Jochem van Dieten http://jochem.vandieten.net/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/04/2009 03:30 AM

AcroForm .... the one with ".pdf" extension. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
07/02/2009 12:23 PM

Just testing to see if my response makes it through.  Please ignore.       

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
cfsearching
07/02/2009 12:27 PM

>Cfdocument won't populate pdf form fields I don't think. >For that, you need to use cfpdfform, cfpdfsubform and cfpdfformparam. Correct. Is there a reason you cannot use these tags to populate your form?  While you certainly could use iText (it is built in), using cfpdfform would be much simpler.  Unless you need some extra functionality that cfpdfform does not provide or you are using an earlier version of CF?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
07/02/2009 12:41 PM

The code below works for me on an application where I populate a PDF form with data from entered fields (or wherever you get the data from).  This might help you a bit. <cfoutput>   <!--- Initailize whatever field names you defined in your form fields below ---> <cfset pdf="#rootip#/#fileip#/#form.file_name#.pdf">   <!--- here you identify the path to your pdf file ---> <cfset name="#trim(ReplaceList(form.name, "(,)", "\(,\)" ))#"> <cfset address="#trim(ReplaceList(form.address, "(,)", "\(,\)" ))#"> <cfset city="#trim(ReplaceList(form.city, "(,)", "\(,\)" ))#"> <cfset phone="#trim(ReplaceList(form.phone, "(,)", "\(,\)" ))#"> <cfset date1="#trim(ReplaceList(form.date, "(,)", "\(,\)" ))#"> <cfset time1="#trim(ReplaceList(form.time, "(,)", "\(,\)" ))#"> <cfset opt1="#trim(ReplaceList(form.opt1, "(,)", "\(,\)" ))#"> <cfset opt2="#trim(ReplaceList(form.opt2, "(,)", "\(,\)" ))#"> <cfsetting enablecfoutputonly="YES"> <cfheader name="Content-Disposition" value="inline; filename=#form.file_name#.fdf"> <cfcontent type="application/vnd.fdf"> </cfif> <cfsetting enablecfoutputonly="NO"><cfinclude template="#form.file_name#.fdf"> </cfoutput> Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or.  It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged __________ Information from ESET Smart Security, version of virus signature database 4209 (20090702) __________ The message was checked by ESET Smart Security. http://www.eset.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Hastings
07/02/2009 12:53 PM

cfsearching@yahoo.com wrote: > Is there a reason you cannot use these tags to populate your form?? While you cf7?

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
07/02/2009 01:04 PM

Paul Hastings wrote: >> Is there a reason you cannot use these tags to populate your form? >cf7? Yes, that is what I am thinking.         

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/02/2009 02:12 PM

Yes guys, I have am aware of the cfdocument and the new cfpdfform tags... although I havent used them for this purpose yet .... I m pretty sure they do any awesome job bcoz without a shadow of a doubt I feel Adobe CF is the best CF implementation :) Having said that.... my problem is that I am using Railo 3.1 and I am trying to figure out a way I can implement the PDF-Form population functionality using Railo 3.1 :) so any good news for me??? Regards, Arsalan ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
07/03/2009 01:03 AM

>Having said that.... my problem is that I am using Railo 3.1 and I am trying >to figure out a way I can implement the PDF-Form population functionality >using Railo 3.1 >:) >so any good news for me??? I know very little about railo. But I _think_ it also uses iText internally. So theoretically you should be able to use iText classes simply by calling createObject(). If not, you could also try using the JavaLoader.cfc.   http://javaloader.riaforge.org/ See this example that works with CF8.  I would be curious to know if it does work with railo, or if needs tweaking. http://cfsearching.blogspot.com/2007/12/getting-started-with-itext-part-15.html       

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Hastings
07/03/2009 03:35 AM

rather than guess, why not post to the railo list? http://groups.google.com/group/railo?hl=en&pli=1

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
07/03/2009 10:25 AM

Paul Hastings wrote: > rather than guess, why not post to the railo list? Well if you are going to resort to logic ... ;)       

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/03/2009 11:12 AM

come on guys ... doesn't anyone here has answer to my problem?? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
07/03/2009 11:24 AM

Probably not, unless Gert manages to see this. For some strange reason, Adobe ColdFusion lists are populated by people with experience in Adobe ColdFusion. I imagine that Railo lists are populated by people with Railo experience. But that's just a guess. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/03/2009 02:56 PM

:) nice imagination .... although I was just inquiring... rather trying to find out a way to dynamically populate PDF Forms with a standard CF8 engine ... not just railo .... :) ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Hastings
07/03/2009 11:32 AM

Arsalan Tariq Keen wrote: > come on guys ... doesn't anyone here has answer to my problem?? it was already answered on the railo list (here previously). itext is distributed w/railo. it powers it's cfdocument & cfpdf. if you want ease of use, use the built-in tags. if you want insane control over your PDF docs, use itext. if you use itext, first thing is buy bruno's book from manning: http://www.manning.com/lowagie/ if you use itext more than once, it's by far the best investment you'll ever make. next read the mysterious cfsearching's blog ;-) http://cfsearching.blogspot.com/search/label/iText gobs & gobs of examples.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Arsalan Tariq Keen
07/04/2009 06:36 AM

Thanks Paul .... thanks for the very helpful link .... now finally I have populated an AcroPDF form using Railo 3.1 :) and the great thing ... Railo has iText classes already bundeled so I didn't have to even add a single file to my Railo's Express Installation :D For people who want to use this.... here is the link for the tutorial (blog): http://cfsearching.blogspot.com/2007/12/getting-started-with-itext-part-15.html Regards, Arsalan ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
07/03/2009 03:40 PM

If you have CF8, use CFPDFFORM. If you have something else, use iText. Dave Watts, CTO, Fig Leaf Software :) nice imagination .... although I was just inquiring... rather trying to find out a way to dynamically populate PDF Forms with a standard CF8 engine ... not just railo .... :) ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

March 22, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31