我尝试创建条形码并将其导出到DOCX。但是当我打开这个DOCX时,条形码的图像分辨率非常差。 我已经读过,Barcode4j支持多种输出格式(SVG,EPS,Bitmap图像......),但是如何设置呢?
我的测试代码:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.1.final using JasperReports Library version 6.2.1 -->
<!-- 2016-04-30T14:14:48 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="folder" pageWidth="595" pageHeight="842" columnWidth="495" leftMargin="50" rightMargin="50" topMargin="20" bottomMargin="20" isTitleNewPage="true" uuid="6dc4b54d-6b32-4fd1-ad46-f29c5a32288e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<title>
<band height="171">
<componentElement>
<reportElement mode="Transparent" x="0" y="20" width="500" height="140" uuid="e6d94a1f-7df2-4ff2-b836-bb7bb8a106c0">
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<jr:EAN13 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<jr:codeExpression><![CDATA["123456789012"]]></jr:codeExpression>
</jr:EAN13>
</componentElement>
</band>
</title>
</jasperReport>
最终,如何创建条形码图像分辨率高的DOCX?