Hi all,
A customer of us requested a rotated barcode. I searched the archives and if
found something about SVG reference orientation.
This seems to work but i noticed two things.
1. the barcode lines seems to be thicker
2. the human readable format is missing
I tested with fop0.95 and barcode4j2.0. I used the following code to
generate the barcode.
xsl:
<fo:instream-foreign-object>
<xsl:variable name="bc" select="barcode:generate(., msg)"/>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
<xsl:attribute name="width"><xsl:value-of
select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of
select="$bc/svg:svg/@height"/></xsl:attribute>
<svg:rect x="0mm" y="0mm" fill="white">
<xsl:attribute name="width"><xsl:value-of
select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute
name="height"><xsl:value-of select="$bc/svg:svg/@height"/></xsl:attribute>
</svg:rect>
<svg:g transform="translate(100, 0), rotate(90)">
<xsl:copy-of select="$bc"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
xml:
<barcode>
<msg>P20968-002</msg>
<code128>
<width>2.5cm</width>
<height>10cm</height>
<module-width>0.53mm</module-width>
</code128>
</barcode>
--
John Kattestaart
[email protected]