Hi,

Just to clarify, are you asking for a block to be indented from the left but 
expand back left if the line was too long to fit in the block? e.g.

+----------------------------------+
|<--> Indentation
|
|
|
|
|    This us a small line.
| This is a longer line that fits.
|    Here is a long line that
|    exceeds the full width of a
|    page.
|
|
|
|
|
+----------------------------------+

If so, I am not sure that is possible with FOP at present. I suppose if you had 
a fixed sized font (Courier), you could implement some XSLT to write each block 
and determine it's indentation based upon the length of the text (content) 
being written. This will not work though with any variable sized font, so 
unless anyone else has any suggestions I think you may need to think again 
about how you are writing your content to the page.

Let me know if I have misunderstood.

Regards,

Robert Meyer

> Date: Wed, 6 Jun 2012 03:11:16 -0700
> From: lmhe...@orange.fr
> To: fop-users@xmlgraphics.apache.org
> Subject: Paragraph indentation with no cut lines
> 
> 
> 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.
> -- 
> View this message in context: 
> http://old.nabble.com/Paragraph-indentation-with-no-cut-lines-tp33969052p33969052.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 
                                          

Reply via email to