亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? barcodeean.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright 2002 by Paulo Soares. * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the License. * * The Original Code is 'iText, a free JAVA-PDF library'. * * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. * All Rights Reserved. * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. * * Contributor(s): all the names of the contributors are added in the source code * where applicable. * * Alternatively, the contents of this file may be used under the terms of the * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the * provisions of LGPL are applicable instead of those above.  If you wish to * allow use of your version of this file only under the terms of the LGPL * License and not to allow others to use your version of this file under * the MPL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the LGPL. * If you do not delete the provisions above, a recipient may use your version * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. * * This library is free software; you can redistribute it and/or modify it * under the terms of the MPL as stated above or under the terms of the GNU * Library General Public License as published by the Free Software Foundation; * either version 2 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more * details. * * If you didn't download this code from the following link, you should check if * you aren't using an obsolete version: * http://www.lowagie.com/iText/ */package com.lowagie.text.pdf;import com.lowagie.text.Rectangle;import com.lowagie.text.ExceptionConverter;import java.util.Arrays;import java.awt.Color;/** Generates barcodes in several formats: EAN13, EAN8, UPCA, UPCE, * supplemental 2 and 5. The default parameters are: * <pre> *x = 0.8f; *font = BaseFont.createFont("Helvetica", "winansi", false); *size = 8; *baseline = size; *barHeight = size * 3; *guardBars = true; *codeType = EAN13; *code = ""; * </pre> * * @author Paulo Soares (psoares@consiste.pt) */public class BarcodeEAN extends Barcode{            /** The bar positions that are guard bars.*/        static int GUARD_EMPTY[] = {};    /** The bar positions that are guard bars.*/        static int GUARD_UPCA[] = {0, 2, 4, 6, 28, 30, 52, 54, 56, 58};    /** The bar positions that are guard bars.*/        static int GUARD_EAN13[] = {0, 2, 28, 30, 56, 58};    /** The bar positions that are guard bars.*/        static int GUARD_EAN8[] = {0, 2, 20, 22, 40, 42};    /** The bar positions that are guard bars.*/        static int GUARD_UPCE[] = {0, 2, 28, 30, 32};    /** The x coordinates to place the text.*/    static float TEXTPOS_EAN13[] = {6.5f, 13.5f, 20.5f, 27.5f, 34.5f, 41.5f, 53.5f, 60.5f, 67.5f, 74.5f, 81.5f, 88.5f};    /** The x coordinates to place the text.*/    static float TEXTPOS_EAN8[] = {6.5f, 13.5f, 20.5f, 27.5f, 39.5f, 46.5f, 53.5f, 60.5f};    /** The basic bar widths.*/    static byte BARS[][] =     {        {3, 2, 1, 1}, // 0        {2, 2, 2, 1}, // 1        {2, 1, 2, 2}, // 2        {1, 4, 1, 1}, // 3        {1, 1, 3, 2}, // 4        {1, 2, 3, 1}, // 5        {1, 1, 1, 4}, // 6        {1, 3, 1, 2}, // 7        {1, 2, 1, 3}, // 8        {3, 1, 1, 2}  // 9    };        /** The total number of bars for EAN13.*/    static final int TOTALBARS_EAN13 = 11 + 12 * 4;    /** The total number of bars for EAN8.*/    static final int TOTALBARS_EAN8 = 11 + 8 * 4;    /** The total number of bars for UPCE.*/    static final int TOTALBARS_UPCE = 9 + 6 * 4;    /** The total number of bars for supplemental 2.*/    static final int TOTALBARS_SUPP2 = 13;    /** The total number of bars for supplemental 5.*/    static final int TOTALBARS_SUPP5 = 31;    /** Marker for odd parity.*/    static final int ODD = 0;    /** Marker for even parity.*/    static final int EVEN = 1;        /** Sequence of parities to be used with EAN13.*/    static byte PARITY13[][] =    {        {ODD, ODD,  ODD,  ODD,  ODD,  ODD},  // 0        {ODD, ODD,  EVEN, ODD,  EVEN, EVEN}, // 1        {ODD, ODD,  EVEN, EVEN, ODD,  EVEN}, // 2        {ODD, ODD,  EVEN, EVEN, EVEN, ODD},  // 3        {ODD, EVEN, ODD,  ODD,  EVEN, EVEN}, // 4        {ODD, EVEN, EVEN, ODD,  ODD,  EVEN}, // 5        {ODD, EVEN, EVEN, EVEN, ODD,  ODD},  // 6        {ODD, EVEN, ODD,  EVEN, ODD,  EVEN}, // 7        {ODD, EVEN, ODD,  EVEN, EVEN, ODD},  // 8        {ODD, EVEN, EVEN, ODD,  EVEN, ODD}   // 9    };        /** Sequence of parities to be used with supplemental 2.*/    static byte PARITY2[][] =    {        {ODD,  ODD},   // 0        {ODD,  EVEN},  // 1        {EVEN, ODD},   // 2        {EVEN, EVEN}   // 3    };        /** Sequence of parities to be used with supplemental 2.*/    static byte PARITY5[][] =    {        {EVEN, EVEN, ODD,  ODD,  ODD},  // 0        {EVEN, ODD,  EVEN, ODD,  ODD},  // 1        {EVEN, ODD,  ODD,  EVEN, ODD},  // 2        {EVEN, ODD,  ODD,  ODD,  EVEN}, // 3        {ODD,  EVEN, EVEN, ODD,  ODD},  // 4        {ODD,  ODD,  EVEN, EVEN, ODD},  // 5        {ODD,  ODD,  ODD,  EVEN, EVEN}, // 6        {ODD,  EVEN, ODD,  EVEN, ODD},  // 7        {ODD,  EVEN, ODD,  ODD,  EVEN}, // 8        {ODD,  ODD,  EVEN, ODD,  EVEN}  // 9    };        /** Sequence of parities to be used with UPCE.*/    static byte PARITYE[][] =    {        {EVEN, EVEN, EVEN, ODD,  ODD,  ODD},  // 0        {EVEN, EVEN, ODD,  EVEN, ODD,  ODD},  // 1        {EVEN, EVEN, ODD,  ODD,  EVEN, ODD},  // 2        {EVEN, EVEN, ODD,  ODD,  ODD,  EVEN}, // 3        {EVEN, ODD,  EVEN, EVEN, ODD,  ODD},  // 4        {EVEN, ODD,  ODD,  EVEN, EVEN, ODD},  // 5        {EVEN, ODD,  ODD,  ODD,  EVEN, EVEN}, // 6        {EVEN, ODD,  EVEN, ODD,  EVEN, ODD},  // 7        {EVEN, ODD,  EVEN, ODD,  ODD,  EVEN}, // 8        {EVEN, ODD,  ODD,  EVEN, ODD,  EVEN}  // 9    };        /** Creates new BarcodeEAN */    public BarcodeEAN() {        try {            x = 0.8f;            font = BaseFont.createFont("Helvetica", "winansi", false);            size = 8;            baseline = size;            barHeight = size * 3;            guardBars = true;            codeType = EAN13;            code = "";        }        catch (Exception e) {            throw new ExceptionConverter(e);        }    }        /** Calculates the EAN parity character.     * @param code the code     * @return the parity character     */        public static int calculateEANParity(String code) {        int mul = 3;        int total = 0;        for (int k = code.length() - 1; k >= 0; --k) {            int n = code.charAt(k) - '0';            total += mul * n;            mul ^= 2;        }        return (10 - (total % 10)) % 10;    }        /** Converts an UPCA code into an UPCE code. If the code can not     * be converted a <CODE>null</CODE> is returned.     * @param text the code to convert. It must have 12 numeric characters     * @return the 8 converted digits or <CODE>null</CODE> if the     * code could not be converted     */        static public String convertUPCAtoUPCE(String text) {        if (text.length() != 12 || !(text.startsWith("0") || text.startsWith("1")))            return null;        if (text.substring(3, 6).equals("000") || text.substring(3, 6).equals("100")            || text.substring(3, 6).equals("200")) {                if (text.substring(6, 8).equals("00"))                    return text.substring(0, 1) + text.substring(1, 3) + text.substring(8, 11) + text.substring(3, 4) + text.substring(11);        }        else if (text.substring(4, 6).equals("00")) {            if (text.substring(6, 9).equals("000"))                return text.substring(0, 1) + text.substring(1, 4) + text.substring(9, 11) + "3" + text.substring(11);        }        else if (text.substring(5, 6).equals("0")) {            if (text.substring(6, 10).equals("0000"))                return text.substring(0, 1) + text.substring(1, 5) + text.substring(10, 11) + "4" + text.substring(11);        }        else if (text.charAt(10) >= '5') {            if (text.substring(6, 10).equals("0000"))                return text.substring(0, 1) + text.substring(1, 6) + text.substring(10, 11) + text.substring(11);        }        return null;    }        /** Creates the bars for the barcode EAN13 and UPCA.     * @param _code the text with 13 digits     * @return the barcode     */        public static byte[] getBarsEAN13(String _code) {        int code[] = new int[_code.length()];        for (int k = 0; k < code.length; ++k)            code[k] = _code.charAt(k) - '0';        byte bars[] = new byte[TOTALBARS_EAN13];        int pb = 0;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        byte sequence[] = PARITY13[code[0]];        for (int k = 0; k < sequence.length; ++k) {            int c = code[k + 1];            byte stripes[] = BARS[c];            if (sequence[k] == ODD) {                bars[pb++] = stripes[0];                bars[pb++] = stripes[1];                bars[pb++] = stripes[2];                bars[pb++] = stripes[3];            }            else {                bars[pb++] = stripes[3];                bars[pb++] = stripes[2];                bars[pb++] = stripes[1];                bars[pb++] = stripes[0];            }        }        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        for (int k = 7; k < 13; ++k) {            int c = code[k];            byte stripes[] = BARS[c];            bars[pb++] = stripes[0];            bars[pb++] = stripes[1];            bars[pb++] = stripes[2];            bars[pb++] = stripes[3];        }        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        return bars;    }        /** Creates the bars for the barcode EAN8.     * @param _code the text with 8 digits     * @return the barcode     */        public static byte[] getBarsEAN8(String _code) {        int code[] = new int[_code.length()];        for (int k = 0; k < code.length; ++k)            code[k] = _code.charAt(k) - '0';        byte bars[] = new byte[TOTALBARS_EAN8];        int pb = 0;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        for (int k = 0; k < 4; ++k) {            int c = code[k];            byte stripes[] = BARS[c];            bars[pb++] = stripes[0];            bars[pb++] = stripes[1];            bars[pb++] = stripes[2];            bars[pb++] = stripes[3];        }        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        for (int k = 4; k < 8; ++k) {            int c = code[k];            byte stripes[] = BARS[c];            bars[pb++] = stripes[0];            bars[pb++] = stripes[1];            bars[pb++] = stripes[2];            bars[pb++] = stripes[3];        }        bars[pb++] = 1;        bars[pb++] = 1;        bars[pb++] = 1;        return bars;    }        /** Creates the bars for the barcode UPCE.     * @param _code the text with 8 digits     * @return the barcode     */        public static byte[] getBarsUPCE(String _code) {        int code[] = new int[_code.length()];        for (int k = 0; k < code.length; ++k)            code[k] = _code.charAt(k) - '0';        byte bars[] = new byte[TOTALBARS_UPCE];

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美电视剧免费全集观看| 麻豆91免费观看| 国内精品自线一区二区三区视频| 色综合久久天天| 日本一区二区三区国色天香| 日韩电影免费在线| 欧美亚洲综合色| 国产精品女同一区二区三区| 久久国内精品自在自线400部| 欧洲精品一区二区| 中文字幕亚洲区| 高清shemale亚洲人妖| 日韩一区和二区| 日韩综合在线视频| 欧美三级日韩在线| 亚洲一区在线观看视频| 91在线小视频| 国产精品欧美一区喷水| 国产v日产∨综合v精品视频| 久久久久久99久久久精品网站| 日本午夜精品视频在线观看| 欧美精品乱码久久久久久| 亚洲午夜激情网站| 欧美日韩国产高清一区| 一二三区精品福利视频| 欧美性猛交xxxx黑人交| 亚洲国产精品久久不卡毛片| 色久综合一二码| 一区二区三区日韩精品| 在线观看日产精品| 亚洲午夜电影在线| 欧美精品在欧美一区二区少妇| 亚洲综合精品久久| 欧美吻胸吃奶大尺度电影| 亚洲一二三区不卡| 欧美色国产精品| 午夜精品123| 91精品福利在线一区二区三区| 日韩精品电影在线| 欧美一级片免费看| 久久国产夜色精品鲁鲁99| www欧美成人18+| 春色校园综合激情亚洲| 亚洲色欲色欲www| 欧美午夜精品电影| 日韩影院在线观看| 久久女同互慰一区二区三区| 成人午夜精品一区二区三区| 一区二区三区四区乱视频| 欧美乱熟臀69xxxxxx| 国产一区二区三区在线观看免费 | 国产精品区一区二区三区| av网站免费线看精品| 亚洲午夜一区二区| 久久综合九色欧美综合狠狠| 成人免费va视频| 午夜精品久久一牛影视| 精品裸体舞一区二区三区| 9久草视频在线视频精品| 三级在线观看一区二区| 国产日本欧洲亚洲| 欧美色国产精品| 国产东北露脸精品视频| 亚洲国产精品一区二区www在线| 精品久久久久久久久久久久久久久| 粉嫩蜜臀av国产精品网站| 亚洲乱码国产乱码精品精的特点 | 777奇米四色成人影色区| 国产一区二区成人久久免费影院 | 国产精品亚洲视频| 亚洲资源在线观看| 26uuu国产日韩综合| 色婷婷av一区二区三区软件| 美国三级日本三级久久99 | 国产精品灌醉下药二区| 欧美麻豆精品久久久久久| 大尺度一区二区| 久久99精品网久久| 亚洲一区二区三区免费视频| 国产清纯白嫩初高生在线观看91| 欧美色偷偷大香| 不卡av电影在线播放| 狠狠色狠狠色合久久伊人| 天天综合天天综合色| 中文字幕电影一区| 欧美tk—视频vk| 欧美性大战xxxxx久久久| 99在线精品免费| 精品一区二区免费在线观看| 亚洲一区二区三区四区的| 国产精品久久久久9999吃药| 日韩一区二区三区电影| 91影院在线观看| 成人午夜视频在线| 国产成人免费在线观看不卡| 日韩国产在线观看| 亚洲成av人在线观看| 亚洲男人的天堂av| 中文字幕一区av| 欧美国产欧美综合| 中文字幕欧美激情一区| 国产午夜亚洲精品羞羞网站| 久久人人97超碰com| 日韩精品一区二区三区视频在线观看| 精品视频一区二区三区免费| 欧美中文一区二区三区| 欧美影院午夜播放| 欧美日韩综合一区| 欧美日韩成人一区| 91精品国产综合久久福利| 欧美日韩免费观看一区二区三区| 色婷婷久久一区二区三区麻豆| 一本到一区二区三区| 色综合久久中文综合久久97| 91免费视频观看| 欧美性生活大片视频| 欧美日本不卡视频| 欧美高清www午色夜在线视频| 欧美美女直播网站| 欧美成人高清电影在线| 精品久久久久香蕉网| 久久蜜臀中文字幕| 国产精品高潮呻吟久久| 亚洲免费观看在线视频| 亚洲一区二区三区自拍| 五月激情综合婷婷| 免费观看在线综合| 国产成人丝袜美腿| 色嗨嗨av一区二区三区| 51久久夜色精品国产麻豆| 日韩午夜精品视频| 久久精品人人做人人爽人人| 国产精品国产三级国产普通话99| 亚洲乱码日产精品bd| 日本不卡高清视频| 国产精品正在播放| 一本到不卡精品视频在线观看| 欧美日韩国产大片| 精品欧美久久久| 亚洲人成精品久久久久久| 天堂影院一区二区| 丁香一区二区三区| 欧美日韩电影在线| 国产女主播一区| 偷偷要91色婷婷| 成熟亚洲日本毛茸茸凸凹| 欧美日韩精品专区| 欧美激情综合在线| 日韩电影一区二区三区| 成人av电影在线| 91精品国产综合久久久久久久久久| 久久色在线观看| 亚洲国产欧美另类丝袜| 国产美女久久久久| 欧美日韩精品三区| 国产女主播在线一区二区| 日韩黄色一级片| 成人av在线观| 欧美va亚洲va香蕉在线| 亚洲综合偷拍欧美一区色| 国产高清亚洲一区| 欧美日韩另类国产亚洲欧美一级| 久久精品视频免费| 老汉av免费一区二区三区| 日本黄色一区二区| 久久精品一区二区三区四区| 午夜天堂影视香蕉久久| 91在线看国产| 国产欧美综合在线观看第十页| 奇米色一区二区三区四区| 91国内精品野花午夜精品| 国产三级欧美三级日产三级99| 午夜在线电影亚洲一区| 99re成人精品视频| 国产日韩av一区| 国产综合色视频| 日韩欧美国产电影| 五月婷婷另类国产| 欧美日韩欧美一区二区| 亚洲精选视频在线| 成人黄页在线观看| 久久美女艺术照精彩视频福利播放| 日韩av一区二区三区| 欧美日韩精品一区二区三区四区| 亚洲欧美另类小说视频| 99视频有精品| 中文字幕中文在线不卡住| 国产.欧美.日韩| 久久久亚洲精品一区二区三区 | 无吗不卡中文字幕| 欧美日韩一区三区四区| 亚洲国产日韩在线一区模特| 91国产视频在线观看| 亚洲在线中文字幕| 色综合一区二区三区| 亚洲日本丝袜连裤袜办公室| 91小视频免费看| 一区二区三区四区不卡视频| 在线精品亚洲一区二区不卡| 亚洲一区二区偷拍精品|