[英]JasperReports Barcode Generation With Barcode4j - Library Dependencies
[英]How to center align barcode using jasperreports and barcode4j
我使用的是iReport 5.5.0 。 如何居中對齊條形碼組件?
我的jrxml的相關片段如下。
<componentElement>
<reportElement x="0" y="9" width="113" height="36" uuid="a11badb4-7c31-4011-83ae-f287b457939a"/>
<jr:Code128 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" textPosition="bottom">
<jr:codeExpression><![CDATA[$F{number}]]></jr:codeExpression>
</jr:Code128>
</componentElement>
創建一個樣式,我們稱之為“條形碼”,如:
<style name="Barcode" fontName="Helvetica" fontSize="10" hAlign="Center" vAlign="Middle"/>
並將條形碼元素的style屬性設置為“Barcode”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.