Java Mailing List Archive

http://www.java2.5341.com/

Home » fop-users.xmlgraphics »

Paragraph indentation with no cut lines

Léa Massiot

2012-06-06

Replies: Find Java Web Hosting

Author LoginPost Reply

Hello,

Thank you for reading my post.

I'm using an XML data file and an XSL-FO stylesheet to generate a PDF file
using "fop".
Here is what I want to do:
I'd like to have some paragraph indented with lines:
- left-aligned,
- uncut (unless they "really" spread over several lines).
Of course, the contents of the paragraph is variable.
For example:

+---------------------------+
|                  |
|                  |
|                  |
|                  |
|                  |
|     Some indented text |
|     And another line  |
|     And again       |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
+---------------------------+

If possible, I don't want any of the paragraph lines to be cut.
For example, here is something that I do not want:

+---------------------------+
|                  |
|                  |
|                  |
|                  |
|                  |
|     Some cut indented |
|     text          |
|     And another line  |
|     And again       |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
+---------------------------+

Here is the result I want instead:

+---------------------------+
|                  |
|                  |
|                  |
|                  |
|                  |
| Some uncut indented text |
| And another line      |
| And again           |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
+---------------------------+

Meaning I can't just set a "fixed" indentation.
The indentation depends on the longest line in the paragraph.

The only case when a line can be cut is when it takes more than the whole
width of the page:

+---------------------------+
|                  |
|                  |
|                  |
|                  |
|                  |
| This line is cut because |
| it spreads over several  |
| lines in the page      |
| And another line       |
| And again           |
|                  |
|                  |
|                  |
|                  |
|                  |
|                  |
+---------------------------+

Is it possible to get such results automatically and how?

Thank you for helping and best regards.
--
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@(protected)
For additional commands, e-mail: fop-users-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.