|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
I don't even know what I need to be able to do this [fdf/ColdFusion ]
Author: Jeff Small
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165721
> //INSERT THIS LINE HERE!
> <cfcontent type="application/vnd.fdf" file="#filename#">
That's awesome! I stumbled onto the same problem right when you replied.
Thanks so much! The only issue I have now is, why isn't it populating my
checkboxes with their appropriate values?
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165719
----- Excess quoted text cut - see Original Post for more -----
//INSERT THIS LINE HERE!
<cfcontent type="application/vnd.fdf" file="#filename#">
----- Excess quoted text cut - see Original Post for more -----
Author: Jeff Small
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165715
> Yes, this is correct
I used your code in a little test example, and all I'm seeing is Text
rendered to the screen. Here is the *EXACT* contents of what I've got. Is
there any good tutorial site for outputting a FDF file using CF that maybe
could help me?
<cfquery name="qGetSubmission" datasource="JeffTesting">
SELECT *
FROM tblPDFTesting
WHERE tblPDFTesting.ID = #URL.ID#
</cfquery>
<cfoutput>%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF <<
/Fields
[
<<
/T(Name)
/V(#qGetSubmission.Name# )
>>
<<
/T(Address)
/V(#qGetSubmission.Address# )
>>
<<
/T(City)
/V(#qGetSubmission.City# )
>>
<<
/T(State)
/V(#qGetSubmission.State# )
>>
<<
/T(Zip)
/V(#qGetSubmission.Zip# )
>>
<<
/T(Liked)
/V(#qGetSubmission.Liked# )
>>
]
/F(http://#cgi.HTTP_HOST#/jeff/pdf/SampleForm.pdf)
>>
>>
endobj
trailer
<</Root 1 0 R>>
%%EOF</cfoutput>
Again, all I'm seeing is rendered plain text on the page, and I'm still on
"viewPDF.cfm" rather than looking at the PDF with Form Data Inserted...I
hope I'm not doing something stupid easy wrong...
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165683
> this...[fdf/cf]
>
> > The client could see a link to a prepopulated fdf file, or they
could
> > see a link to cfm template that serves up the fdf file via
cfcontent.
> > Inside the fdf file is a link pointing back to the pdf file.
>
> Which, if I'm understanding you correctly, just opens the PDF that the
FDF
> file "points" to, and in the person's browser window, they see the PDF
> with
> the populated form data.
>
Yes, this is correct
Author: Ian Skinner
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165681
I think *that's* the difference between "Acrobat" and "Acrobat Reader". If
you have "Acrobat" you can save the PDF with the form data intact, and
rename it something else. If you have Reader, you can save the form, but
when you open it up wherever you saved it, it doesn't retain the populated
form data. Or at least that's been *my* experience.
There used to be an intermediate product circa 2000 that was between "Acrobat
Reader" and the full "Acrobat", that would allow a user to save and use the FDF
forms, but did not have all the authoring tools of the full product to create new
PDF documents. IIRC it was priced about $100 as opposed the $300 of the full
Acrobat application.
HTH
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
Author: Jeff Small
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165677
> I've never processed the acrobat form data, but from what I understand,
> they're just standard form fields
Okay, that's easy enough to figure out.
> The client could see a link to a prepopulated fdf file, or they could
> see a link to cfm template that serves up the fdf file via cfcontent.
> Inside the fdf file is a link pointing back to the pdf file.
Which, if I'm understanding you correctly, just opens the PDF that the FDF
file "points" to, and in the person's browser window, they see the PDF with
the populated form data.
> > And if she has Acrobat Pro, she can just "save" it?
>
> You can save the FDF file which when clicked will open acrobat and
> populate the remote pdf form with data. I don't know if you can save
> the pdf file with the data stored in it or not. I don't have acrobat
> here to test it.
I think *that's* the difference between "Acrobat" and "Acrobat Reader". If
you have "Acrobat" you can save the PDF with the form data intact, and
rename it something else. If you have Reader, you can save the form, but
when you open it up wherever you saved it, it doesn't retain the populated
form data. Or at least that's been *my* experience.
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165669
> this...[fdf/cf]
>
> Okay, so lemme get this straight.
>
> I could have the PDF data submitted to a CF page that could process it
and
> enter it into a database table. Then, a CFQUERY tag could generate
output
> that could be saved as an FDF.
I've never processed the acrobat form data, but from what I understand,
they're just standard form fields
> How
> does the end user (the client) "see" the PDF File? Does she click on a
CF
> link that does all the work? So she clicks on "CreatePDF.cfm" or
whatever,
> and the result, is that a populated PDF form opens in her browser
window?
The client could see a link to a prepopulated fdf file, or they could
see a link to cfm template that serves up the fdf file via cfcontent.
Inside the fdf file is a link pointing back to the pdf file.
>
> And if she has Acrobat Pro, she can just "save" it?
You can save the FDF file which when clicked will open acrobat and
populate the remote pdf form with data. I don't know if you can save
the pdf file with the data stored in it or not. I don't have acrobat
here to test it.
Author: Jeff Small
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165648
----- Excess quoted text cut - see Original Post for more -----
form and the /V command which is the value you want inserted.
>
> The /F command needs to point to the parent pdf file. I believe that
Acrobat (not reader) will actually make the fdf file for you and then you'd
just need to edit the file. On caveat, don't edit the file with notepad.
Notepad doesn't correctly render the CR after the first line "%FDF-1.2".
>
> I serve these on the fly using the cfcontent tag and so far, this has been
a painless endeavor.
Okay, so lemme get this straight.
I could have the PDF data submitted to a CF page that could process it and
enter it into a database table. Then, a CFQUERY tag could generate output
that could be saved as an FDF, then point it to a "Parent" PDF File? How
does the end user (the client) "see" the PDF File? Does she click on a CF
link that does all the work? So she clicks on "CreatePDF.cfm" or whatever,
and the result, is that a populated PDF form opens in her browser window?
And if she has Acrobat Pro, she can just "save" it?
Am I understanding it all?
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165641
Jeff,
FDF files are just simple text files that are very easy to create with CF.
Here's an example:
<cfoutput>%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF << /Fields
[
<<
/T(issuedate)
/V(#dateformat(rs.cert_issue_dt,"mm/dd/yyyy")# )
>>
]
/F(http://#cgi.HTTP_HOST#/files/certificate.pdf)
>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF</cfoutput>
Just keep repeating the /T command which is the text box name in the pdf form and
the /V command which is the value you want inserted.
The /F command needs to point to the parent pdf file. I believe that Acrobat
(not reader) will actually make the fdf file for you and then you'd just need to
edit the file. On caveat, don't edit the file with notepad. Notepad doesn't
correctly render the CR after the first line "%FDF-1.2".
I serve these on the fly using the cfcontent tag and so far, this has been a
painless endeavor.
--
Marlon Moyer, Sr. Internet Developer
American Contractors Insurance Group
phone: 972.687.9445
fax: 972.687.0607
mailto:mmoyer@acig.com
www.acig.com
Author: Jeff Small
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33017#165629
Here are the basic requirements:
They (client) have a couple of hundred forms in PDF format that they want
*their* clients to be able to "fill out" and "submit". We have CF sitting on
their server. On their (client's) end, they want to be able to save the same
PDF form, but filled out, on their end.
Likely scenario:
The Client's "client":
I log in, click on a form, the PDF loads, I fill out the PDF, click a button
on the PDF, some CF happens that I don't see. A thank you page is displayed,
and I go about my business. (Upside, no form validation, they're going to be
"going over" each form themselves on the back end)
The Client:
Some notification (Hey, a PDF was filled out!), log in to a back end, see a
list of forms submitted, date submitted maybe, and by whom (based on above's
loginID). Click on a link to the latest entry, the PDF loads (?) and it's
filled in with the information from the previous submission (?), I click
"save" (I have Acrobat Pro on my end, I'm "The Client".) and it saves it
maybe with the date/time added to the end of the file name...
Now, I know about 50% of that, but I'm willing to jump in the direction of
any CF based way of accomplishing that very scenario. Oh, and it's hosted on
Crystal Tech, who (rightfully so) informed us that loading an application
would require us to be on our own dedicated server (so, no beef there,
legit, I get it and it just gives me my design parameters, I'm anything if
not flexible and understanding), but a .dll could be done, so keep that in
mind. Also, these forms are insurance-related, so they'll contain stuff like
SSNs and other assorted goodies, so simply emailing them won't really work
(unless encryption can be worked into that scenario). I was hoping to be
able to write all this to happen behind an https://, to take care of that
concern.
Now, notice that, if the PDF was a form, it'd be an easy exercise, but I'm
just not sure about the whole, "inserting stuff into a PDF from a CFQUERY
tag" thing. But again, eager beaver...
So my question, I guess is, how best to accomplish this, with the tools I've
got? We can explore getting some possibly sub-grand cost PDF/FDF .dll stuff
to assist, but can this be done with CF or running on a CF server?
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||