Link to home
Start Free TrialLog in
Avatar of erikTsomik
erikTsomikFlag for United States of America

asked on

Coldfusion printing to PDF

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
Avatar of strickdd
strickdd
Flag of United States of America image

Not quite sure what you mean, but it sounds like you need to check/uncheck the radio buttons each loop.
Avatar of erikTsomik

ASKER

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
how are you setting the results as checked or not? Should the first user have all checks?
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">
Avatar of _agx_
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
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>
>> 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">
I just waned to reuse the code. that I already got
>> 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.  
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
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.
But I am doing it for 1 person how? have no idea.
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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