Ich konvertiere einige HTML in eine PDF mit XSLT. Ich bekomme unerwünschte Zeilenumbrüche, und ich weiß nicht warum. HierUnerwünschte Zeilenumbrüche in PDF-Dateien, die mit XSL-FO erstellt wurden?
ist die HTML-Quelle:
<li><strong>must</strong> only work in the occupation and for
the sponsor with the most recently approved nomination for
the holder <strong>unless</strong> the visa holder's
occupation is specified on a relevant instrument;
</li>
und hier ist, wie es in einem Browser aussieht:
Hier sind einige der XSLT:
<xsl:template match="condition/div">
<xsl:apply-templates select="div|p|ul|li|a|ol|strong"/>
</xsl:template>
<xsl:template match="li" mode="bullet">
<fo:list-item>
Unicode Bullet Character
<fo:list-item-label end-indent="label-end()">
<fo:block>
•
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block font-size="8pt" padding-bottom="2mm" padding-top="1mm">
<xsl:apply-templates />
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:template>
<xsl:template match="strong">
<fo:block font-weight="bold">
<xsl:value-of select="." />
</fo:block>
</xsl:template>
... und so sieht die Ausgabe aus:
Wie Sie sehen können, erscheinen unerwünschte Zeilenumbrüche nach den <strong>
Tags. Irgendwelche Ideen, wie man das verhindern kann?
Ich liebe Stackoverflow und ich liebe kjhughes. :) –