Solved

Textarea to PDF

Posted on 2009-07-10
3
655 Views
Last Modified: 2012-05-07
I have a coldfusion form and in the form I have a textarea for the user to leave notes.  The field can hold 1000 characters.  I want to give the user the ability to print the page to pdf format.  This seems to work, except when I get to the textarea it just cuts off the notes on the right side.  It doesn't seem to wrap properly.  It wraps but it does it somewhere off the page.  So then I tried to simply use a table.  That works but I can't keep the line breaks that were entered into the textarea.  Here is an example:
If the user enters this:
This is a test This is a test this is a test This is a test This is a test this is a test
This is a test This is a test this is a test This is a test This is a test this is a test

When I try to export it into PDF as a text area I get (cuts off the right side)
This is a test This is a test this is a test This is a test This
a test This is a test This is a test this is a test This is a test
 is a test

When I try table format I get (it looses the line breaks)
This is a test This is a test this is a test This is a test This is a test this is a test This is a test This is a test this is a test This is a test This is a test this is a test

So what do I do.  
0
Comment
Question by:trifecta2k
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 24827337
richtext="yes"
Link
http://www.carehart.org/blog/client/index.cfm/2008/8/1/rich_textarea_getting_it_right

Selvol

http://www.carehart.org/blog/client/index.cfm/2008/8/1/rich_textarea_getting_it_right
 
<cfform>
<cftextarea richtext="yes" toolbar="Basic" name="somefield"></cftextarea>
<input type="Submit">
</cfform>
 
<cfdump var="#form#">

Open in new window

0
 
LVL 5

Author Comment

by:trifecta2k
ID: 24839502
Thanks!  I didn't know they added a richtext feature to cftextarea. I just don't use it enough.  Thanks again
0
 
LVL 17

Expert Comment

by:selvol
ID: 24839567
GLad  to assist.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question