Solved

Textarea to PDF

Posted on 2009-07-10
3
654 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

772 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