Skip to main content
Participant
October 16, 2009
Question

newline for pdf?

  • October 16, 2009
  • 1 reply
  • 3740 views

I've created a pdf in Acrobat that has a multiline textfield, but not sure what the tag to create a newline. I tried \n, <br/> but the text lined up on 1 line.


code example:


<cfset  address="1234 Main St.

                          Suite 100

                          Los Angeles, CA 12345" />

<cfpdfform action="populate" source="myfile.pdf" destination="output.pdf"   >
        <cfpdfformparam name="address" value="#address#" />
</cfpdfform>

thanks in advance

Lance

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    October 18, 2009

    Did you put in the line break like this?

    <cfset  address="1234 Main St." & "<br>" & "Suite 100" & "<br>" & "Los Angeles, CA 12345">

    lvo811Author
    Participant
    October 18, 2009

    I tried your method it displayed <br> on the pdf. However I found a solution by using chr(10) and chr(13). Thanks for you help.

    BKBK
    Community Expert
    Community Expert
    October 18, 2009
    I tried your method it displayed <br> on the pdf.

    Oh! It worked when tested with <cfdocument format="pdf"><cfoutput>#address#</cfoutput></cfdocument>. Anyway, you've got it working, so no need to carry on.