7 Replies Latest reply on Jun 11, 2015 10:38 AM by nadipalli1984

    cftextarea to PDF

    KevinByrne

      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?

        • 1. Re: cftextarea to PDF
          nadipalli1984

          hi, is your issue resolved. I am having the same issue.

          • 2. Re: cftextarea to PDF
            EddieLotter Level 3

            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

            • 3. Re: cftextarea to PDF
              nadipalli1984 Level 1

              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>

              • 4. Re: cftextarea to PDF
                EddieLotter Level 3

                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

                • 5. Re: cftextarea to PDF
                  nadipalli1984 Level 1

                  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.

                  • 6. Re: cftextarea to PDF
                    EddieLotter Level 3

                    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

                    • 7. Re: cftextarea to PDF
                      nadipalli1984 Level 1

                      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.