Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Coldfusion printing to PDF

Posted on 2011-09-16
14
Medium Priority
?
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Certified OpenStack Administrator Course

We just refreshed our COA course based on the Newton exam.  With 14 labs, this course goes over the different OpenStack services that are part of the certification: Dashboard, Identity Service, Image Service, Networking, Compute, Object Storage, Block Storage, and Orchestration.

 
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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

730 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