我想使用PDF中的代码39创建条形码,可以帮助我如何编写JRHTML文件以打印PDF
我已经尝试了以下尝试,但是面临一些问题。还有其他方法我们可以使用Code39生成条形码。
<componentElement>
<reportElement x="353" y="42" width="200" height="50"/>
<jr:Code39 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[$P{printid}]]>
</jr:codeExpression>
</jr:Code39>
</componentElement>
python,使用reportlab和pypdf能够将代码39条形码放入文档中。这是一些示例代码的链接。
您将需要Python,带有ReportLab和Pypdf(最后两个是Python库)
https://github.com/glokem/barcodepdf
另外,该存储库中包含的一些"摘要"代码可能对您有用...?
获取代码39字体并使用该字体创建文档。http://www.barcodesinc.com/free-barcode-font/