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

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

?? pdfbarcode.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * $Id: PdfBarcode.java,v 1.16 2002/06/20 13:28:22 blowagie Exp $ * $Name:  $ * * Copyright 2001, 2002 Bruno Lowagie * * 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;/** * A barcode is a Chunk with a certain type of barcode font. * <P> * With this class you can construct several types of barcode * in different sizes, representing any 'product' or 'article' number. */public class PdfBarcode extends com.lowagie.text.Chunk {        /** This is a type of barcode. */    public static final int CODE39 = 1;        /** This is a type of barcode. */    public static final int UPCA = 2;        /** This is a type of barcode. */    public static final int EAN13 = 3;        /** This is a type of barcode. */    public static final int INTERLEAVED_2_OF_5 = 4;        /** The variable parity table in EAN 13 */    public static final int[][] variableParity =    { {0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2},    {0, 0, 1, 0, 1, 1, 2, 2, 2, 2, 2, 2},    {0, 0, 1, 1, 0, 1, 2, 2, 2, 2, 2, 2},    {0, 0, 1, 1, 1, 0, 2, 2, 2, 2, 2, 2},    {0, 1, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2},    {0, 1, 1, 0, 0, 1, 2, 2, 2, 2, 2, 2},    {0, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 2},    {0, 1, 0, 1, 0, 1, 2, 2, 2, 2, 2, 2},    {0, 1, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2},    {0, 1, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2} };        /**     * Creates a new Barcode.     *     * @param   ttf     the ttf file representing the barcode font     * @param   size    the size of the barcode     * @param   number  the number you want to convert to a barcode in String format     */        public PdfBarcode(String ttf, int type, int size, String number) throws com.lowagie.text.BadElementException, com.lowagie.text.DocumentException, java.io.IOException {        super(convertToCode(type, number), new com.lowagie.text.Font(BaseFont.createFont(ttf, "winansi", true), size));    }        /**     * Creates a new Barcode.     *     * @param   ttf     the ttf file representing the barcode font     * @param   size    the size of the barcode     * @param   number  the number you want to convert to a barcode in long format     */        public PdfBarcode(String ttf, int type, int size, long number) throws com.lowagie.text.BadElementException, com.lowagie.text.DocumentException, java.io.IOException {        super(convertToCode(type, String.valueOf(number)), new com.lowagie.text.Font(BaseFont.createFont(ttf, "winansi", true), size));    }        /**     * Converts a String representing a number to a barcode with a specific barcode font.     *     * @param   type    the type of barcode     * @param   number  the number you want to convert to a barcode in long format     */        private static String convertToCode(int type, String number) throws com.lowagie.text.BadElementException {        StringBuffer code = new StringBuffer();        int length = number.length();        int digit;        int pos = 0;        try {            switch(type) {                case CODE39:                    code.append('*');                    while (pos < length) {                        code.append(number.substring(pos, ++pos));                    }                    code.append('*');                    break;                case UPCA:                    if (length > 12) throw new com.lowagie.text.BadElementException("An UPC-A barcode can only encode a 12 digit number (your number was " + number + ").");                    number = addZero(number, 12);                    digit = Integer.parseInt(number.substring(pos, ++pos));                    code.append((char) (digit + 80));                    while (pos < 6) {                        digit = Integer.parseInt(number.substring(pos, ++pos));                        code.append((char) (digit + 48));                    }                    code.append((char) 112);                    while (pos < 11) {                        digit = Integer.parseInt(number.substring(pos, ++pos));                        code.append((char) (digit + 64));                    }                    digit = Integer.parseInt(number.substring(11));                    code.append((char) (digit + 96));                    break;                case EAN13:                    if (length > 13) throw new com.lowagie.text.BadElementException("An EAN-13 barcode can only encode a 13 digit number (your number was " + number + ").");                    number = addZero(number, 13);                    int firstdigit = Integer.parseInt(number.substring(pos, ++pos));                    code.append((char) (firstdigit + 33));                    digit = Integer.parseInt(number.substring(pos, ++pos));                    code.append((char) (digit + 96));                    while (pos < 7) {                        digit = Integer.parseInt(number.substring(pos, ++pos));                        code.append((char) (digit + 48 + 16 * variableParity[firstdigit][pos - 2]));                    }                    code.append((char) 124);                    while (pos < 12) {                        digit = Integer.parseInt(number.substring(pos, ++pos));                        code.append((char) (digit + 48 + 16 * variableParity[firstdigit][pos - 2]));                    }                    digit = Integer.parseInt(number.substring(12));                    code.append((char) (digit + 112));                    break;                case INTERLEAVED_2_OF_5:                    if (length % 2 == 1) {                        number = addZero(number, length + 1);                    }                    code.append('(');                    while (number.length() > 2) {                        digit = Integer.parseInt(number.substring(0, 2));                        code.append(convertInterleaved(digit));                        pos += 2;                        number = number.substring(2);                    }                    digit = Integer.parseInt(number);                    code.append(convertInterleaved(digit));                    code.append(')');                    break;                default:                    throw new com.lowagie.text.BadElementException("This type of barcode is not supported yet: " + type);            }        }        catch(NumberFormatException nfe) {            throw new com.lowagie.text.BadElementException("NumberFormatException at position " + pos + " in " + number + ": " + nfe.getMessage());        }        return code.toString();    }        /**     * Converts an int to a convert interleaved character.     */        private static char convertInterleaved(int digits) throws NumberFormatException {        int i;        if (digits < 50) {            i = 48;        }        else if (digits < 100) {            i = 142;        }        else {            throw new NumberFormatException(String.valueOf(digits));        }        return (char)(digits + i);    }        /**     * Adds leading zeros.     */        private static String addZero(String number, int length) {        StringBuffer buf = new StringBuffer();        int zeros = length - number.length();        for (int i = 0; i < zeros; i++) {            buf.append('0');        }        buf.append(number);        return buf.toString();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
xnxx国产精品| 精品久久久影院| 成人欧美一区二区三区在线播放| 国产一区二区在线观看视频| 日韩一区二区三区高清免费看看| 亚洲大片在线观看| 欧美特级限制片免费在线观看| 亚洲精品福利视频网站| 一本色道综合亚洲| 亚洲黄色尤物视频| 欧洲一区在线观看| 一区二区三区高清| 欧美综合色免费| 亚洲国产精品一区二区www在线| 欧洲激情一区二区| 午夜精品久久久久久久久 | 国产aⅴ精品一区二区三区色成熟| 久久综合久久99| 国产suv一区二区三区88区| 国产精品嫩草久久久久| 94-欧美-setu| 亚洲一区二区三区中文字幕在线| 欧美日韩中文字幕一区二区| 日韩av不卡一区二区| 日韩亚洲欧美综合| 国内精品久久久久影院一蜜桃| 久久综合九色综合欧美98| 国产成人免费av在线| 国产精品久久久久aaaa| 色婷婷一区二区| 婷婷综合在线观看| 欧美大度的电影原声| 国产乱码精品一区二区三区av| 欧美激情一区二区三区全黄| 99视频有精品| 亚洲一区二区三区激情| 91精品午夜视频| 激情综合网av| 成人欧美一区二区三区视频网页| 日本韩国欧美三级| 日韩成人dvd| 国产欧美一区二区三区在线看蜜臀 | 亚洲一区国产视频| 欧美一区二区三区四区在线观看| 加勒比av一区二区| 国产精品视频免费看| 在线观看免费视频综合| 美女一区二区视频| 国产女主播一区| 欧美又粗又大又爽| 精品亚洲欧美一区| 综合在线观看色| 欧美一卡二卡在线观看| 国产成人午夜视频| 亚洲国产日韩综合久久精品| 欧美tk—视频vk| 99免费精品视频| 日本成人在线一区| 国产精品第五页| 日韩一级黄色片| av欧美精品.com| 爽好久久久欧美精品| 国产欧美一区二区在线观看| 欧美色中文字幕| 国产精品影视在线观看| 亚洲一区二区三区自拍| 国产清纯美女被跳蛋高潮一区二区久久w| 色久综合一二码| 韩国成人福利片在线播放| 亚洲精品久久久蜜桃| 久久久精品综合| 欧美日韩国产a| 成人精品免费看| 日韩精品电影一区亚洲| 一区精品在线播放| 精品理论电影在线观看| 色88888久久久久久影院野外| 国产毛片精品视频| 亚洲成人免费在线| 中文字幕一区日韩精品欧美| 欧美一区二区三区白人| 成人黄色一级视频| 蜜臀久久久久久久| 亚洲激情第一区| 国产欧美日韩在线视频| 91精品国产综合久久久久| 91色婷婷久久久久合中文| 韩日欧美一区二区三区| 一区二区视频免费在线观看| 国产亚洲成年网址在线观看| 91精品国产一区二区人妖| 91蜜桃在线观看| 国产suv一区二区三区88区| 青青草97国产精品免费观看 | 亚洲欧美影音先锋| 精品电影一区二区| 欧美福利视频一区| 91免费版在线看| 成人网在线播放| 国产麻豆精品久久一二三| 日韩激情中文字幕| 亚洲精品福利视频网站| 国产精品大尺度| 国产亚洲欧美日韩俺去了| 91精品国产一区二区人妖| 精品视频在线看| 在线免费观看日本欧美| 99久久99久久精品免费观看| 国产成人免费在线视频| 激情综合五月天| 久久99国产精品久久| 视频一区二区国产| 亚洲电影欧美电影有声小说| 亚洲美女视频在线观看| 中文字幕一区二区在线观看| 国产精品天美传媒| 国产三级三级三级精品8ⅰ区| 精品日韩在线一区| 欧美一级xxx| 91精品国产高清一区二区三区蜜臀| 欧美性xxxxx极品少妇| 欧洲av在线精品| 91久久香蕉国产日韩欧美9色| 色哟哟日韩精品| 色天天综合色天天久久| 色婷婷久久久久swag精品| 色综合久久中文字幕综合网| 91蝌蚪国产九色| 91理论电影在线观看| 色女孩综合影院| 欧美在线观看你懂的| 精品视频一区二区不卡| 欧美高清视频不卡网| 欧美一区二区在线视频| 91精品国产综合久久精品app| 欧美日韩精品高清| 欧美电影在哪看比较好| 欧美一级免费观看| 精品剧情在线观看| 久久久久国产成人精品亚洲午夜| 国产人久久人人人人爽| 中文字幕一区二区三区色视频| 国产精品夫妻自拍| 亚洲男人的天堂在线aⅴ视频| 一区二区三区中文字幕电影 | 亚洲人成网站在线| 一区二区三区蜜桃网| 亚洲国产精品久久久久秋霞影院| 日韩精品亚洲专区| 精品亚洲成a人在线观看| 国产一区 二区 三区一级| 成人国产免费视频| 色婷婷av一区二区三区软件 | 欧美精品视频www在线观看| 欧美一区二区视频观看视频| 精品区一区二区| 国产日韩欧美制服另类| 亚洲免费观看高清完整版在线观看熊 | 亚洲一区电影777| 秋霞国产午夜精品免费视频| 国产一区二区三区不卡在线观看| 成人av动漫网站| 欧美三级日韩三级国产三级| 日韩一区二区精品| 久久久久久久久久看片| 最新久久zyz资源站| 午夜精品久久久久久久久久| 韩国av一区二区三区在线观看| 99re这里只有精品视频首页| 欧美日本一区二区三区| xfplay精品久久| 最新日韩av在线| 日本在线不卡视频| 国产成人在线视频免费播放| 91浏览器入口在线观看| 日韩网站在线看片你懂的| 国产精品污www在线观看| 亚洲成a天堂v人片| 国产综合成人久久大片91| 99国产精品一区| 91精品视频网| 国产精品久久久久久户外露出| 亚欧色一区w666天堂| 国产91精品精华液一区二区三区 | av午夜一区麻豆| 欧美精品久久久久久久多人混战| 国产午夜精品一区二区三区视频 | 亚洲视频一区二区在线| 青青草成人在线观看| 91网站视频在线观看| 日韩一区二区精品葵司在线| 1区2区3区精品视频| 蜜臀av在线播放一区二区三区| 99国产精品99久久久久久| 日韩午夜精品视频| 亚洲四区在线观看| 狠狠色丁香久久婷婷综合_中| 91美女片黄在线观看| 精品久久久久一区| 亚洲制服欧美中文字幕中文字幕|