2
我正在使用XSL-FO和XML生成PDF。在文本框中,用户可以输入数据如“1”,然后按ENTER,然后按“2”,ENTER,“3”等。但在PDF中,输出为“1234567”。我如何保留换行符?我已经尝试白空间崩溃,换行处理和空白处理但这并没有帮助。换行(进入)即将进入XML。在使用XSL-FO生成的PDF中插入换行符
<xsl:template match="AddCmt">
<fo:block keep-together="always"> Additional Comments
<fo:block-container border-style="solid" height="20mm" width="170mm" space-after="5mm">
<fo:block wrap-option="wrap" linefeed-treatment="preserve" white-space-collapse="false" white-space-treatment="preserve">
<xsl:attribute name="id">
<xsl:value-of select="../CMT_ID"/>
</xsl:attribute>
<xsl:value-of select="../ANS_CMT"/>
</fo:block>
</fo:block-container>
</fo:block>
上面的评论有什么意义? – mzjn
这个问题似乎是一个(不太完整)的这个副本: http://stackoverflow.com/questions/12294398/how-to-insert-line-breaks-in-a-pdf-generated-with-xsl -fo – RobertG