waqarirshad / jspdf

Automatically exported from code.google.com/p/jspdf
0 stars 0 forks source link

Need ability to break text to next line when it exceeds maximum page width linit #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In the demo code ,give text of with characters more than or about to 70 
character of size "22"
2. the final pdf prints every text in a single line and not the complete line 
is shown the page, only the part of text which comes within the page limit
3.

What is the expected output? What do you see instead?
when ever we give text with character more than a page line can hold line break 
should be implemented and printed so that every  text comes within the page

What version of the product are you using? On what operating system?
Latest version available in the site jspdf-20090504.zip

Please provide any additional information below.
Add a line in code
doc.text(20, 30, 'Trying to wirte a text which is very long that does not holds 
within a liine. Expected to be break internally and print in separate line ');

Original issue reported on code.google.com by arun.yog...@gmail.com on 14 Jun 2012 at 3:34

GoogleCodeExporter commented 8 years ago
I agree with the above, this is very (very) important functionality missing 
from the product.

To clarify further, as the text is being added to the PDF, if the end of line 
(right most column) is reached, a new line should automatically be started with 
the initial X coordinate of the new line to be equal to the x specified in the 
original statement doc.text(x,...

This brings up two additional requirements to fill out this functionality:

1. The "end of line" (the rightmost column) should be user-definable so that we 
can print a block of text somewhere in the center of page that does not extend 
to either the left of right side of a page.

2. When a new line occurs, the increment of the Y coordinate should also be 
user-definable.  This will allow for "single, line 1/2, double" vertical line 
spacing.

Original comment by courtney...@gmail.com on 21 Aug 2013 at 12:29