在grails应用程序中,我需要生成PDF417图像并通过电子邮件发送。谁能推荐我一个(希望是免费的)grails插件或java库?
最佳答案
条码4j插件(http://grails.org/plugin/barcode4j)使用的条码4j支持PDF417等。
这是一个示例 Controller Action ,该 Action 将生成图像并将其呈现给浏览器:
import org.krysalis.barcode4j.impl.pdf417.PDF417Bean
class TestController {
def index = {
def generator = new PDF417Bean()
generator.height = 10
def barcodeValue = "12345"
renderBarcodePng(generator, barcodeValue)
}
}