Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Coldfusion printing to PDF

Posted on 2011-09-16
14
Medium Priority
?
396 Views
Last Modified: 2013-11-19
I have a loop which I am going through and for each of the loop I am
building th pdf. As I go I output 1 person and all radio buttons are check
as I go to the second person none of my radio buttons are checked
0
Comment
Question by:erikTsomik
  • 6
  • 6
  • 2
14 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 36550613
Not quite sure what you mean, but it sounds like you need to check/uncheck the radio buttons each loop.
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 36550718
well I have users. Each user have test taken so now i need ot display the results. For the first user all radio buttons are checked, for the second and rest none of the radio buttons are checked
0
 
LVL 28

Expert Comment

by:strickdd
ID: 36550738
how are you setting the results as checked or not? Should the first user have all checks?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Author Comment

by:erikTsomik
ID: 36550764
it is in the coldfusion loop. And I am only outputting the completed test. so at least some options are check.

Also If i output to html then all appropriate radio buttons are checked. I am using <cfdocument format="pdf">
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36550821
CF8 doesn't support form field creation with cfdocument. It doesn't error, but the fields don't really work right.  I haven't used it, but the CF9 docs suggest it might be supported if OpenOffice is installed.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c21.html
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 36550841
well what I doing is storing all forms into cfsavecontent and then using cfdocument
<cfsavecontent variable="printHTML">

</cfsavecontent >

<cfdocument format="pdf">
  <cfoutput>
    #variables.printHTML#
  </cfoutput>
</cfdocument>
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36550863
>> And I am only outputting the completed test.

In that case it doesn't make to sense to generate working radio buttons anyway.  Display an image instead, like an image of check mark  

ie <img src="http://yourserver.com/folder/containing/checkmarkimage.png">
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 36550873
I just waned to reuse the code. that I already got
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36550881
>> well what I doing is storing all forms into cfsavecontent and then using cfdocument

That's fine as long as it's just html. But like I said you can't create <form>'s or form fields like <input> using cfdocument.  They're not supported.  
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 36550894
well it works for 1 person when i do the output. OK it is html . By html has a form in it . so by removing the <form tag
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36550912
Gah... our posts keep crossing.

>> I just waned to reuse the code. that I already got

To be 100% clear - you can't.  Not if the code contains form fields.  Not the answer you want to hear, I know. But that's the way it is. What you're trying to do just isn't supported. Sorry.
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 36550927
But I am doing it for 1 person how? have no idea.
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 2000 total points
ID: 36550993
Crossed again ....

>> well it works for 1 person when i do the output.
>> But I am doing it for 1 person how? have no idea.

Possibly adobe started to implement the feature and stopped midway? I don't know .. and it doesn't really matter it's internal voodoo that we can't fix it.  AFAIK - the docs say it's not supported and I believe them.  Remember "Not supported" doesn't always mean it doesn't work at all.  It also means the behavior of something isn't guaranteed. So you shouldn't rely on it because it might not always work. That certainly seems to be the case here.

You could waste a lot of time on this or just take them at their word ;-) From my own experience and numerous threads I've seen on the topic, my advice is - don't bother.  It just doesn't work.  You're better off accepting that it's not supposed to work and modifying your code.  In the end it'll take far less time.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 36551271
But again it doesn't make sense to try and create working radio buttons. If the purpose of the pdf is to store results from a web form then it shouldn't be interactive anyway.  So the way I see it the problem is the goal rather than lack of support for interactive forms in <cfdocument>.

Just my $0.02
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question