Copy link to clipboard
Copied
We are using Cold Fusion 8. I created a text box on a form using cftextarea, which uses FCKeditor that came with CF8. When I try to populate a PDF form using cfpdfform/cfpdfformparam the embedded HTML shows as plain text.
For example: If I input "This is bold", the pdf form output shows "<b>This is bold</b>". How do I massage the input to display properly in the PDF form?
Copy link to clipboard
Copied
hi, is your issue resolved. I am having the same issue.
Copy link to clipboard
Copied
Please show minimal code to reproduce your issue.
I suspect I know what the problem is, but I don't want to make unsubstantiated guesses.
Cheers
Eddie
Copy link to clipboard
Copied
thanks Eddie for checking on this for me.
here phone is saved in rtf format. If I just print it I get the bold done, but if i used the cfpdfform to print it, i get as <b>test format</b>
here is my code
<cfdocument format="PDF" filename="fileex1.pdf" overwrite="Yes" mimetype="text/plain" fontembed="yes" >
<html>
<body>
<cfdocumentsection>
<cfoutput>#rsEstimate.phone#</cfoutput>
</cfdocumentsection>
<cfpdfform source="live1.pdf" action="populate" overwritedata="true" >
<cfpdfformparam name="address" value="#rsEstimate.phone#">
</cfpdfform>
</body></html>
</cfdocument>
<cfpdf
action = "write"
source = "fileex1.pdf"
destination = "fileex3.pdf"
flatten = "yes"
overwrite = "yes"
></cfpdf>
Copy link to clipboard
Copied
The cfDocumentSection is showing bold text because the contents of rsEstimate.phone is being rendered as HTML.
The cfpdfFormParam is simply assigning a string value to a form field, it does not format the form field in any way.
If you want the form field to have specific formatting, you need to do that in your PDF editor.
Cheers
Eddie
Copy link to clipboard
Copied
oh ok. Thank you Eddie.
The formatting might keep changing every time the user creates a new estimate.
So is there a way in PDF editor to read those formatting?
Do you know any settings that I have to make to read and render as HTML in PDF editor.
Copy link to clipboard
Copied
It looks like you want to implement conditional formatting.
I suspect that will involve a script in the form PDF file.
That is way out of my area of expertise. Sorry.
Cheers
Eddie
Copy link to clipboard
Copied
Ahh..got you
thank you Eddie.
yea, I am not familiar with that stuff either. I will just try to create a PDF using CSS styles, which is not giving me the exact look though.
Thanks again for taking time to answer my questions.