Examples of QRCodeWriter


Examples of com.google.zxing.qrcode.QRCodeWriter

  }

  public BufferedImage encode(String data) {
    // get a byte matrix for the data
    BitMatrix matrix;
    com.google.zxing.Writer writer = new QRCodeWriter();
    try {
      matrix = writer.encode(data, com.google.zxing.BarcodeFormat.QR_CODE, width, height);
    } catch (com.google.zxing.WriterException e) {
      // exit the method
      return null;
    }
View Full Code Here

Examples of com.google.zxing.qrcode.QRCodeWriter

            int size = page.paramOrDefault(int.class, "size", 200);
            Hashtable<EncodeHintType, ErrorCorrectionLevel> hintMap = new Hashtable<EncodeHintType, ErrorCorrectionLevel>();

            hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);

            QRCodeWriter writer = new QRCodeWriter();
            BitMatrix matrix = writer.encode(data, BarcodeFormat.QR_CODE, size, size, hintMap);
            BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_RGB);

            image.createGraphics();

            Graphics2D graphics = (Graphics2D) image.getGraphics();
View Full Code Here

Examples of com.google.zxing.qrcode.QRCodeWriter

        if (width > 1000 || height > 1000 || contents.length() > 1000) {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }

        QRCodeWriter writer = new QRCodeWriter();
        final BitMatrix bitMatrix = writer.encode(contents, BarcodeFormat.QR_CODE, width, height);

        StreamingOutput stream = new StreamingOutput() {
            @Override
            public void write(OutputStream os) throws IOException,
                    WebApplicationException {
View Full Code Here

Examples of com.itextpdf.text.pdf.qrcode.QRCodeWriter

     * ISO-8859-1.
     * @throws WriterException
     */
    public BarcodeQRCode(String content, int width, int height, Map<EncodeHintType,Object> hints) {
        try {
            QRCodeWriter qc = new QRCodeWriter();
            bm = qc.encode(content, width, height, hints);
        }
        catch (WriterException ex) {
            throw new ExceptionConverter(ex);
        }
    }
View Full Code Here

Examples of com.itextpdf.text.pdf.qrcode.QRCodeWriter

     * ISO-8859-1.
     * @throws WriterException
     */
    public BarcodeQRCode(String content, int width, int height, Map<EncodeHintType,Object> hints) {
        try {
            QRCodeWriter qc = new QRCodeWriter();
            bm = qc.encode(content, width, height, hints);
        }
        catch (WriterException ex) {
            throw new ExceptionConverter(ex);
        }
    }
View Full Code Here

Examples of com.itextpdf.text.pdf.qrcode.QRCodeWriter

     * ISO-8859-1.
     * @throws WriterException
     */
    public BarcodeQRCode(String content, int width, int height, Map<EncodeHintType,Object> hints) {
        try {
            QRCodeWriter qc = new QRCodeWriter();
            bm = qc.encode(content, width, height, hints);
        }
        catch (WriterException ex) {
            throw new ExceptionConverter(ex);
        }
    }
View Full Code Here

Examples of com.itextpdf.text.pdf.qrcode.QRCodeWriter

     * ISO-8859-1.
     * @throws WriterException
     */
    public BarcodeQRCode(String content, int width, int height, Map<EncodeHintType,Object> hints) {
        try {
            QRCodeWriter qc = new QRCodeWriter();
            bm = qc.encode(content, width, height, hints);
        }
        catch (WriterException ex) {
            throw new ExceptionConverter(ex);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.