开发者

PDF417 image generation API recommendation

开发者 https://www.devze.com 2023-02-26 06:48 出处:网络
in a grails application I need to generate a PDF417 i开发者_如何学运维mage and send it via email. Can anybody recommend me a (hopefully free) grails plugin or java library?The barcode4j plugin (http:/

in a grails application I need to generate a PDF417 i开发者_如何学运维mage and send it via email. Can anybody recommend me a (hopefully free) grails plugin or java library?


The barcode4j plugin (http://grails.org/plugin/barcode4j) uses barcode4j which has support for PDF417 among others.

Here's a sample controller action that would generate an image and render it to the browser:

import org.krysalis.barcode4j.impl.pdf417.PDF417Bean

class TestController {
   def index = {

      def generator = new PDF417Bean()
      generator.height = 10

      def barcodeValue = "12345"
      renderBarcodePng(generator, barcodeValue)
   }
}


For the "send it via email" part of your feature, I recommend the mail plugin. The documentation explains how to configure and use it.

0

精彩评论

暂无评论...
验证码 换一张
取 消