[
https://issues.apache.org/jira/browse/FOP-2946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17517406#comment-17517406
]
J Frank commented on FOP-2946:
------------------------------
Please use text-align="center" , display-align="center" and white space no wrap
if required.
e.g.
{code:xml}
<fo:table-cell border-bottom="1.000000pt solid black" border-right="1.000000pt
solid black" border-left="1.000000pt solid black" border-top="1.000000pt solid
black"
number-rows-spanned="6"
text-align="center" display-align="center"><fo:block-container
reference-orientation="90">
<fo:block font-weight="bold"
white-space="nowrap">
Gracious Professionalism
</fo:block></fo:block-container>
</fo:table-cell>
{code}
I have attached test.fo to generate desired output, out.pdf.
> Rotated text inside a table cell doesn't get sized properly
> -----------------------------------------------------------
>
> Key: FOP-2946
> URL: https://issues.apache.org/jira/browse/FOP-2946
> Project: FOP
> Issue Type: Bug
> Components: fo/block
> Affects Versions: 2.5
> Environment: >java -version
> openjdk version "1.8.0_252"
> OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
> OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
> >fop -version
> FOP Version 2.5
> Reporter: Jon Schewe
> Priority: Major
> Attachments: out.pdf, rotated-text.fo, test.fo
>
>
> In the attached file I have added the text "Gracious Professionalism" rotated
> 90 degrees spanning 6 rows of the table in the first column. I have added a
> red border to the block so that I can debug the sizing. The table cell is
> properly sized as can be seen by the black border. However the block in side
> the table cell doesn't appear to have any size.
> I can work around this by adding the following to the block tag.
> {code:java}
> inline-progression-dimension="138px" {code}
> However this requires me to be able to guess the amount of space required for
> the text. I've had some luck using {{Font.getWordWidth()}}, however that
> value is usually too small.
> Ideally I would like the block to have the same size as the containing cell
> and then the text be rendered within that area, wrapping if needed.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)