⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdf417.java

📁 著名IDAutomation公司的JAVA条码控件源码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
package com.idautomation.barcode.pdf417;

import java.awt.*;
import java.awt.image.MemoryImageSource;
import java.awt.image.PixelGrabber;
import java.io.PrintStream;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Calendar;

// Referenced classes of package com.idautomation.pdf417:
//            IDAImageCreator

public class PDF417 extends Canvas
    implements Serializable
{

    public String code;
    public byte binaryCode[];
    public boolean processTilde;
    public double leftMarginCM;
    protected static final int d = 3;
    public double topMarginCM;
    protected int leftMarginPixels;
    protected int topMarginPixels;
    private int endOfCode;
    private int suplementTopMargin;
    public Color backColor;
    public String codeText;
    protected int narrowBarPixels;
    protected int widthBarPixels;
    protected double narrowBarCM;
    protected double widthBarCM;
    public int resolution;
    protected int barHeightPixels;
    public double N;
    public double X;
    public double XtoYRatio;
    private double barHeightCM;
    public boolean truncated;
    public int width;
    public int height;
    public int pWidth;
    public int pHeight;
    public boolean autoSize;
    public Font textFont;
    public Color fontColor;
    public Color barColor;
    public double I;
    public double H;
    public double L;
    public int rotate;
    final int PDF417_START = 0x1fea8;
    final int PDF417_STOP = 0x1fd14;
    protected String textCodes[][] = {
        {
            " ", "C26"
        }, {
            "!", "D10"
        }, {
            "\\", "D5"
        }, {
            "\r", "D11"
        }, {
            "\t", "D12"
        }, {
            "\n", "D15"
        }, {
            "#", "C15"
        }, {
            "$", "C18"
        }, {
            "%", "C21"
        }, {
            "&", "C10"
        }, {
            "'", "D28"
        }, {
            "(", "D23"
        }, {
            ")", "D24"
        }, {
            "*", "C22"
        }, {
            "+", "C20"
        }, {
            ",", "C13"
        }, {
            "-", "C16"
        }, {
            ".", "C17"
        }, {
            "/", "C19"
        }, {
            "0", "C0"
        }, {
            "1", "C1"
        }, {
            "2", "C2"
        }, {
            "3", "C3"
        }, {
            "4", "C4"
        }, {
            "5", "C5"
        }, {
            "6", "C6"
        }, {
            "7", "C7"
        }, {
            "8", "C8"
        }, {
            "9", "C9"
        }, {
            ":", "C14"
        }, {
            ";", "D0"
        }, {
            "<", "D1"
        }, {
            "=", "C23"
        }, {
            ">", "D2"
        }, {
            "?", "D25"
        }, {
            "@", "D3"
        }, {
            "A", "A0"
        }, {
            "B", "A1"
        }, {
            "C", "A2"
        }, {
            "D", "A3"
        }, {
            "E", "A4"
        }, {
            "F", "A5"
        }, {
            "G", "A6"
        }, {
            "H", "A7"
        }, {
            "I", "A8"
        }, {
            "J", "A9"
        }, {
            "K", "A10"
        }, {
            "L", "A11"
        }, {
            "M", "A12"
        }, {
            "N", "A13"
        }, {
            "O", "A14"
        }, {
            "P", "A15"
        }, {
            "Q", "A16"
        }, {
            "R", "A17"
        }, {
            "S", "A18"
        }, {
            "T", "A19"
        }, {
            "U", "A20"
        }, {
            "V", "A21"
        }, {
            "W", "A22"
        }, {
            "X", "A23"
        }, {
            "Y", "A24"
        }, {
            "Z", "A25"
        }, {
            "[", "D4"
        }, {
            "\"", "D20"
        }, {
            "]", "D6"
        }, {
            "^", "C24"
        }, {
            "_", "D7"
        }, {
            "`", "D8"
        }, {
            "a", "B0"
        }, {
            "b", "B1"
        }, {
            "c", "B2"
        }, {
            "d", "B3"
        }, {
            "e", "B4"
        }, {
            "f", "B5"
        }, {
            "g", "B6"
        }, {
            "h", "B7"
        }, {
            "i", "B8"
        }, {
            "j", "B9"
        }, {
            "k", "B10"
        }, {
            "l", "B11"
        }, {
            "m", "B12"
        }, {
            "n", "B13"
        }, {
            "o", "B14"
        }, {
            "p", "B15"
        }, {
            "q", "B16"
        }, {
            "r", "B17"
        }, {
            "s", "B18"
        }, {
            "t", "B19"
        }, {
            "u", "B20"
        }, {
            "v", "B21"
        }, {
            "w", "B22"
        }, {
            "x", "B23"
        }, {
            "y", "B24"
        }, {
            "z", "B25"
        }, {
            "{", "D26"
        }, {
            "|", "D21"
        }, {
            "}", "D27"
        }, {
            "~", "D9"
        }
    };
    protected int coef[][] = {
        {
            27, 917
        }, {
            522, 568, 723, 809
        }, {
            237, 308, 436, 284, 646, 653, 428, 379
        }, {
            274, 562, 232, 755, 599, 524, 801, 132, 295, 116,
            442, 428, 295, 42, 176, 65
        }, {
            361, 575, 922, 525, 176, 586, 640, 321, 536, 742,
            677, 742, 687, 284, 193, 517, 273, 494, 263, 147,
            593, 800, 571, 320, 803, 133, 231, 390, 685, 330,
            63, 410
        }, {
            539, 422, 6, 93, 862, 771, 453, 106, 610, 287,
            107, 505, 733, 877, 381, 612, 723, 476, 462, 172,
            430, 609, 858, 822, 543, 376, 511, 400, 672, 762,
            283, 184, 440, 35, 519, 31, 460, 594, 225, 535,
            517, 352, 605, 158, 651, 201, 488, 502, 648, 733,
            717, 83, 404, 97, 280, 771, 840, 629, 4, 381,
            843, 623, 264, 543
        }, {
            521, 310, 864, 547, 858, 580, 296, 379, 53, 779,
            897, 444, 400, 925, 749, 415, 822, 93, 217, 208,
            928, 244, 583, 620, 246, 148, 447, 631, 292, 908,
            490, 704, 516, 258, 457, 907, 594, 723, 674, 292,
            272, 96, 684, 432, 686, 606, 860, 569, 193, 219,
            129, 186, 236, 287, 192, 775, 278, 173, 40, 379,
            712, 463, 646, 776, 171, 491, 297, 763, 156, 732,
            95, 270, 447, 90, 507, 48, 228, 821, 808, 898,
            784, 663, 627, 378, 382, 262, 380, 602, 754, 336,
            89, 614, 87, 432, 670, 616, 157, 374, 242, 726,
            600, 269, 375, 898, 845, 454, 354, 130, 814, 587,
            804, 34, 211, 330, 539, 297, 827, 865, 37, 517,
            834, 315, 550, 86, 801, 4, 108, 539
        }, {
            524, 894, 75, 766, 882, 857, 74, 204, 82, 586,
            708, 250, 905, 786, 138, 720, 858, 194, 311, 913,
            275, 190, 375, 850, 438, 733, 194, 280, 201, 280,
            828, 757, 710, 814, 919, 89, 68, 569, 11, 204,
            796, 605, 540, 913, 801, 700, 799, 137, 439, 418,
            592, 668, 353, 859, 370, 694, 325, 240, 216, 257,
            284, 549, 209, 884, 315, 70, 329, 793, 490, 274,
            877, 162, 749, 812, 684, 461, 334, 376, 849, 521,
            307, 291, 803, 712, 19, 358, 399, 908, 103, 511,
            51, 8, 517, 225, 289, 470, 637, 731, 66, 255,
            917, 269, 463, 830, 730, 433, 848, 585, 136, 538,
            906, 90, 2, 290, 743, 199, 655, 903, 329, 49,
            802, 580, 355, 588, 188, 462, 10, 134, 628, 320,
            479, 130, 739, 71, 263, 318, 374, 601, 192, 605,
            142, 673, 687, 234, 722, 384, 177, 752, 607, 640,
            455, 193, 689, 707, 805, 641, 48, 60, 732, 621,
            895, 544, 261, 852, 655, 309, 697, 755, 756, 60,
            231, 773, 434, 421, 726, 528, 503, 118, 49, 795,
            32, 144, 500, 238, 836, 394, 280, 566, 319, 9,
            647, 550, 73, 914, 342, 126, 32, 681, 331, 792,
            620, 60, 609, 441, 180, 791, 893, 754, 605, 383,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -