• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfdocument problem with textarea linebreaks

New Here ,
Mar 04, 2009 Mar 04, 2009

Copy link to clipboard

Copied

Hi,

I am using cfdocument to generate pdf. There are some <textarea> input type fields as well, and if the data of those textarea fields contains any linebreaks, then the generated pdf shows empty boxes.

Any help is appriciated. I am using CF 8.1.31
TOPICS
Advanced techniques

Views

822

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2009 Mar 06, 2009

Copy link to clipboard

Copied

LATEST
before you use the textarea's value in cfdocument, replace all CR & LF
characters with <br />.

there are couple of cf functions you can use to do it:

replace(somestring, chr(10) & chr(13), "<br />", "all")
rereplace(somestring, "\r\n", "<br />", "all")
listchangedelims(somestring, "<br />", chr(10) & chr(13))

[cf representation of CR and LF chars is chr(10) and chr(13); \r and \n
are regexp character classes for CR and LF]

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation