pdf417

How to set width of generated pdf417 barcode using java

人走茶凉 提交于 2020-01-11 10:19:08
问题 Hi I am working on generating pdf417 barcode. For this I followed this link. try { String a = "Microsoft"; String b = "wkejew"; PDF417 barcode = new PDF417(); barcode.setData(a+b); // barcode.setData(a); ServletOutputStream servletoutputstream = response.getOutputStream(); response.setContentType("image/gif"); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); barcode.drawBarcode(servletoutputstream); } catch

phonegap-plugin-barcodescanner, type PDF417 bar-codes using ionic

两盒软妹~` 提交于 2019-12-11 05:58:06
问题 I am fairly new to Ionic development and thus far has not run into too many problems. However, I am stuck on trying to get PDF417 type bar-codes to scan (using phonegap-plugin-barcodescanner), despite the documentation suggesting that they are supported via pass the "PDF_417" parameter in the "formats" option. Note: the scanning works on other codes such as QR_CODE, EAN_13 - So the code is mostly right. I don't think that the options list after the error function is being processed.

How can I call or emulate Google Mobile Vision API in Google Cloud?

本小妞迷上赌 提交于 2019-12-11 05:54:37
问题 Background: Building on Does google cloud vision OCR support bar code reading?, I want to do offline analysis of PDF417 barcodes using Google Mobile Vision (Barcode API) but accessible from Google Cloud. Is there any way to call, emulate or otherwise access the Google Mobile Vision API off-Android/off-iOS? 回答1: I ended up rolling a Google Cloud Function to detect QR codes for images loaded into Google Cloud Storage, which handled the use case where, like you, I would have preferred to use

ZXing PDF417 + ALL_CODE_TYPES

依然范特西╮ 提交于 2019-12-11 03:04:35
问题 Using ZXing (on Android), if you initiate a PDF417 barcode scan like this... List<String> oDesiredFormats = Arrays.asList("PDF_417".split(",")); IntentIntegrator integrator = new IntentIntegrator(this); integrator.initiateScan(oDesiredFormats); ... and you initiate an "all codes" (except PDF417 and maybe a few others) barcode scan like this... IntentIntegrator integrator = new IntentIntegrator(this); integrator.initiateScan(); ... then how do you initiate a single barcode scan that will

zxing pdf417 size of the image

风格不统一 提交于 2019-12-07 04:41:03
问题 I am testing PDF417 zxing libs, but resizing the output doesn't work as I exptected. The output has always the same aspect ratio. Changing the dimensions doesn't influence the output, I tried EncodeHintType as suggested in other messages, but with no success. Here the code: public class PDF417demo { public static void main(String[] args) { String barcodeMessage = "test"; final String PATH = "/home/test/"; final int WIDTH = 30; BitMatrix bitMatrix; Writer writer; try { Map hints = new HashMap(

zxing pdf417 size of the image

梦想的初衷 提交于 2019-12-05 11:12:36
I am testing PDF417 zxing libs, but resizing the output doesn't work as I exptected. The output has always the same aspect ratio. Changing the dimensions doesn't influence the output, I tried EncodeHintType as suggested in other messages, but with no success. Here the code: public class PDF417demo { public static void main(String[] args) { String barcodeMessage = "test"; final String PATH = "/home/test/"; final int WIDTH = 30; BitMatrix bitMatrix; Writer writer; try { Map hints = new HashMap(); hints.put(EncodeHintType.MARGIN, 2); hints.put(EncodeHintType.PDF417_DIMENSIONS, new Dimensions(20

How to set width of generated pdf417 barcode using java

南笙酒味 提交于 2019-12-02 02:42:13
Hi I am working on generating pdf417 barcode. For this I followed this link. try { String a = "Microsoft"; String b = "wkejew"; PDF417 barcode = new PDF417(); barcode.setData(a+b); // barcode.setData(a); ServletOutputStream servletoutputstream = response.getOutputStream(); response.setContentType("image/gif"); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); barcode.drawBarcode(servletoutputstream); } catch (Exception e) { throw new ServletException(e); } so now problem is the barcode I am getting is having much

利用zxing读写PDF417码制的二维码

柔情痞子 提交于 2019-12-01 11:52:56
项目中需要用到二维码,二维码的码制是PDF417,在做了一番研究之后发现zxing是个不错的开源工具(代码托管在google上面)。为什么选择zxing,由于其他一些工具比如barcode4j(开源,支持读,好像不支持写,最后维护时间在2010年)、barcode(商业版)都不太适合,所以选择了zxing。 zxing并没有提供直接可以使用的jar文件,而是需要自己通过编译源码,生成需要的jar文件。额外说明,zxing利用maven管理自己的代码,并且默认使用了jdk7,代码中也使用了jdk7的一些新特性,基于这些情况,可以适当调整jdk的版本(如果降低jdk的版本,需要改动少量的源码)。 下面直接贴出读写文件的代码: ZxingPdfRead package test; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.net.URLDecoder; import java.util.EnumMap; import java.util.Map; import javax.imageio.ImageIO; import com.google.zxing.BinaryBitmap; import com.google.zxing

利用iText和zxing生成和读pdf417二维码

吃可爱长大的小学妹 提交于 2019-11-30 22:16:31
前面的一些博文中已经提到了zxing这个开源工具生成和读取二维码图片,仅从学习的角度来看,可以 告一个段落。在实际的生产环境中,应用zxing生成和读取二维码,却存在一些问题: 使用扫描枪读取zxing生成的带中文的二维码图片的时候,存在中文乱码问题; 用zxing生成的二维码图片会随着存储信息量的增大,图片也会变大(就这一点来说,使用iText这个工具生成的二维码图片的长宽会相对固定一点,这也是选择iText生成二维码的一个因素)。 为了解决这些问题,在经过一番折腾后,找到了一个替代的解决方案,使用iText工具生成二维码图片,由于iText没有提供类读取二维码内容,这里我们仍然使用zxing,并且特别注意了中文乱码的问题。下面是代码: package test; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io