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

📄 pdfname.java

📁 一个java操作pdf文件的开发包,很好用的.
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    public static final PdfName RESETFORM = new PdfName("ResetForm");        /** This is a static final PdfName */    public static final PdfName RESOURCES = new PdfName("Resources");        /** This is a static final PdfName */    public static final PdfName RI = new PdfName("RI");        /** This is a static final PdfName */    public static final PdfName ROOT = new PdfName("Root");        /** This is a static final PdfName */    public static final PdfName ROTATE = new PdfName("Rotate");        /** This is a static final PdfName */    public static final PdfName ROWS = new PdfName("Rows");        /** This is a static final PdfName */    public static final PdfName RUNLENGTHDECODE = new PdfName("RunLengthDecode");        /** This is a static final PdfName */    public static final PdfName S = new PdfName("S");        /** This is a static final PdfName */    public static final PdfName SEPARATION = new PdfName("Separation");        /** This is a static final PdfName */    public static final PdfName SHADING = new PdfName("Shading");        /** This is a static final PdfName */    public static final PdfName SHADINGTYPE = new PdfName("ShadingType");        /** This is a static final PdfName */    public static final PdfName SIG = new PdfName("Sig");        /** This is a static final PdfName */    public static final PdfName SIGFLAGS = new PdfName("SigFlags");        /** This is a static final PdfName */    public static final PdfName SINGLEPAGE = new PdfName("SinglePage");        /** This is a static final PdfName */    public static final PdfName SIZE = new PdfName("Size");        /** This is a static final PdfName */    public static final PdfName SQUARE = new PdfName("Square");        /** This is a static final PdfName */    public static final PdfName STAMP = new PdfName("Stamp");        /** This is a static final PdfName */    public static final PdfName STANDARD = new PdfName("Standard");        /** This is a static final PdfName */    public static final PdfName STRIKEOUT = new PdfName("StrikeOut");        /** This is a static final PdfName */    public static final PdfName SUBFILTER = new PdfName("SubFilter");        /** This is a static final PdfName */    public static final PdfName SUBJECT = new PdfName("Subject");        /** This is a static final PdfName */    public static final PdfName SUBMITFORM = new PdfName("SubmitForm");        /** This is a static final PdfName */    public static final PdfName SUBTYPE = new PdfName("Subtype");        /** This is a static final PdfName */    public static final PdfName SUPPLEMENT = new PdfName("Supplement");        /** This is a static final PdfName */    public static final PdfName SW = new PdfName("SW");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName SYMBOL = new PdfName("Symbol");        /** This is a static final PdfName */    public static final PdfName T = new PdfName("T");        /** This is a static final PdfName */    public static final PdfName TEXT = new PdfName("Text");        /** This is a static final PdfName */    public static final PdfName THUMB = new PdfName("Thumb");        /** This is a static final PdfName */    public static final PdfName THREADS = new PdfName("Threads");        /** This is a static final PdfName */    public static final PdfName TI = new PdfName("TI");        /** This is a static final PdfName */    public static final PdfName TILINGTYPE = new PdfName("TilingType");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName TIMES_ROMAN = new PdfName("Times-Roman");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName TIMES_BOLD = new PdfName("Times-Bold");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName TIMES_ITALIC = new PdfName("Times-Italic");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName TIMES_BOLDITALIC = new PdfName("Times-BoldItalic");        /** This is a static final PdfName */    public static final PdfName TITLE = new PdfName("Title");        /** This is a static final PdfName */    public static final PdfName TM = new PdfName("TM");        /** This is a static final PdfName */    public static final PdfName TP = new PdfName("TP");        /** This is a static final PdfName */    public static final PdfName TRANS = new PdfName("Trans");        /** This is a static final PdfName */    public static final PdfName TU = new PdfName("TU");        /** This is a static final PdfName */    public static final PdfName TWOCOLUMNLEFT = new PdfName("TwoColumnLeft");        /** This is a static final PdfName */    public static final PdfName TWOCOLUMNRIGHT = new PdfName("TwoColumnRight");        /** This is a static final PdfName */    public static final PdfName TX = new PdfName("Tx");        /** This is a static final PdfName */    public static final PdfName TYPE = new PdfName("Type");        /** This is a static final PdfName */    public static final PdfName TYPE1 = new PdfName("Type1");        /** This is a static final PdfName of an attribute. */    public static final PdfName U = new PdfName("U");        /** This is a static final PdfName of an attribute. */    public static final PdfName UNDERLINE = new PdfName("Underline");        /** This is a static final PdfName */    public static final PdfName URI = new PdfName("URI");        /** This is a static final PdfName */    public static final PdfName URL = new PdfName("URL");        /** This is a static final PdfName */    public static final PdfName USENONE = new PdfName("UseNone");        /** This is a static final PdfName */    public static final PdfName USEOUTLINES = new PdfName("UseOutlines");        /** This is a static final PdfName */    public static final PdfName USETHUMBS = new PdfName("UseThumbs");        /** This is a static final PdfName */    public static final PdfName V = new PdfName("V");        /** This is a static final PdfName */    public static final PdfName VIEWERPREFERENCES = new PdfName("ViewerPreferences");        /** This is a static final PdfName of an attribute. */    public static final PdfName W = new PdfName("W");        /** This is a static final PdfName of an attribute. */    public static final PdfName WIDGET = new PdfName("Widget");        /** This is a static final PdfName of an attribute. */    public static final PdfName WIDTH = new PdfName("Width");        /** This is a static final PdfName */    public static final PdfName WIDTHS = new PdfName("Widths");        /** This is a static final PdfName of an encoding */    public static final PdfName WIN = new PdfName("Win");        /** This is a static final PdfName of an encoding */    public static final PdfName WIN_ANSI_ENCODING = new PdfName("WinAnsiEncoding");        /** This is a static final PdfName of an encoding */    public static final PdfName WP = new PdfName("WP");        /** This is a static final PdfName of an encoding */    public static final PdfName WS = new PdfName("WS");        /** This is a static final PdfName */    public static final PdfName X = new PdfName("X");        /** This is a static final PdfName */    public static final PdfName XOBJECT = new PdfName("XObject");        /** This is a static final PdfName */    public static final PdfName XSTEP = new PdfName("XStep");        /** This is a static final PdfName */    public static final PdfName XYZ = new PdfName("XYZ");        /** This is a static final PdfName */    public static final PdfName YSTEP = new PdfName("YStep");        /** This is a static final PdfName of a base 14 type 1 font */    public static final PdfName ZAPFDINGBATS = new PdfName("ZapfDingbats");        private int hash = 0;        // constructors        /**     * Constructs a <CODE>PdfName</CODE>-object.     *     * @param		name		the new Name.     */        public PdfName(String name) {        super(PdfObject.NAME, name);        // The minimum number of characters in a name is 0, the maximum is 127 (the '/' not included)        if (bytes.length > 127) {            throw new IllegalArgumentException("The name is too long (" + bytes.length + " characters).");        }        // The name has to be checked for illegal characters        int length = name.length();        for (int i = 0; i < length; i++) {            if (name.charAt(i) < 32 || name.charAt(i) > 255) {                throw new IllegalArgumentException("Illegal character on position " + i + ".");            }        }        // every special character has to be substituted        StringBuffer pdfName = new StringBuffer("/");        char character;        // loop over all the characters        for (int index = 0; index < length; index++) {            character = name.charAt(index);            // special characters are escaped (reference manual p.39)            switch (character) {                case ' ':                case '%':                case '(':                case ')':                case '<':                case '>':                case '[':                case ']':                case '{':                case '}':                case '/':                case '#':                    pdfName.append('#');                    pdfName.append(Integer.toString((int) character, 16));                    break;                default:                    if (character > 126) {                        pdfName.append('#');                        pdfName.append(Integer.toString((int) character, 16));                    }                    else                        pdfName.append(character);                    break;            }        }        setContent(pdfName.toString());    }        // methods        /**     * Compares this object with the specified object for order.  Returns a     * negative integer, zero, or a positive integer as this object is less     * than, equal to, or greater than the specified object.<p>     *     *     * @param   object the Object to be compared.     * @return  a negative integer, zero, or a positive integer as this object     *		is less than, equal to, or greater than the specified object.     *     * @throws ClassCastException if the specified object's type prevents it     *         from being compared to this Object.     */    public int compareTo(Object object) {        PdfName name = (PdfName) object;                byte myBytes[] = bytes;        byte objBytes[] = name.bytes;        int len = Math.min(myBytes.length, objBytes.length);        for(int i=0; i<len; i++) {            if(myBytes[i] > objBytes[i])                return 1;                        if(myBytes[i] < objBytes[i])                return -1;        }        if (myBytes.length < objBytes.length)            return -1;        if (myBytes.length > objBytes.length)            return 1;        return 0;    }        /**     * Indicates whether some other object is "equal to" this one.     *     * @param   obj   the reference object with which to compare.     * @return  <code>true</code> if this object is the same as the obj     *          argument; <code>false</code> otherwise.     */    public boolean equals(Object obj) {        return compareTo(obj) == 0;    }        /**     * Returns a hash code value for the object. This method is     * supported for the benefit of hashtables such as those provided by     * <code>java.util.Hashtable</code>.     *     * @return  a hash code value for this object.     */    public int hashCode() {        int h = hash;        if (h == 0) {            int ptr = 0;            int len = bytes.length;                        for (int i = 0; i < len; i++)                h = 31*h + (bytes[ptr++] & 0xff);            hash = h;        }        return h;    }        /** Decodes an escaped name in the form "/AB#20CD" into "AB CD".     * @param name the name to decode     * @return the decoded name     */    public static String decodeName(String name) {        StringBuffer buf = new StringBuffer();        try {            int len = name.length();            for (int k = 1; k < len; ++k) {                char c = name.charAt(k);                if (c == '#') {                    c = (char)((PRTokeniser.getHex(name.charAt(k + 1)) << 4) + PRTokeniser.getHex(name.charAt(k + 2)));                    k += 2;                }                buf.append(c);            }        }        catch (IndexOutOfBoundsException e) {            // empty on purpose        }        return buf.toString();    }}

⌨️ 快捷键说明

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