【发布时间】:2011-08-16 12:42:43
【问题描述】:
我正在使用 iText 创建一个 PDF417 条形码,如下所示:
private InputStream getBarcode() throws Exception {
BarcodePDF417 barcode = new BarcodePDF417();
barcode.setText("Sample bar code text");
Image image = barcode.getImage();
image.scalePercent(50, 50 * barcode.getYHeight());
return new ByteArrayInputStream(image.getRawData());
}
我需要将barcode.getImage() 返回的 CCITT 格式转换为 JPG、GIF 或 PNG,以便我可以将其包含在我在 JasperReports 中创建的文档中。
【问题讨论】:
标签: java jasper-reports itext