Home » pdfbox-1.1.0-src » org.apache.pdfbox.encoding » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.pdfbox.encoding;
   18   
   19   import org.apache.pdfbox.cos.COSBase;
   20   import org.apache.pdfbox.cos.COSName;
   21   
   22   /**
   23    * This is an interface to a text encoder.
   24    *
   25    * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
   26    * @version $Revision: 1.10 $
   27    */
   28   public class MacRomanEncoding extends Encoding
   29   {
   30       /**
   31        * Constructor.
   32        */
   33       public MacRomanEncoding()
   34       {
   35           addCharacterEncoding( 0101, COSName.getPDFName( "A" ) );
   36           addCharacterEncoding( 0256, COSName.getPDFName( "AE" ) );
   37           addCharacterEncoding( 0347, COSName.getPDFName( "Aacute" ) );
   38           addCharacterEncoding( 0345, COSName.getPDFName( "Acircumflex" ) );
   39           addCharacterEncoding( 0200, COSName.getPDFName( "Adieresis" ) );
   40           addCharacterEncoding( 0313, COSName.getPDFName( "Agrave" ) );
   41           addCharacterEncoding( 0201, COSName.getPDFName( "Aring" ) );
   42           addCharacterEncoding( 0314, COSName.getPDFName( "Atilde" ) );
   43           addCharacterEncoding( 0102, COSName.getPDFName( "B" ) );
   44           addCharacterEncoding( 0103, COSName.getPDFName( "C" ) );
   45           addCharacterEncoding( 0202, COSName.getPDFName( "Ccedilla" ) );
   46           addCharacterEncoding( 0104, COSName.getPDFName( "D" ) );
   47           addCharacterEncoding( 0105, COSName.getPDFName( "E" ) );
   48           addCharacterEncoding( 0203, COSName.getPDFName( "Eacute" ) );
   49           addCharacterEncoding( 0346, COSName.getPDFName( "Ecircumflex" ) );
   50           addCharacterEncoding( 0350, COSName.getPDFName( "Edieresis" ) );
   51           addCharacterEncoding( 0351, COSName.getPDFName( "Egrave" ) );
   52           addCharacterEncoding( 0106, COSName.getPDFName( "F" ) );
   53           addCharacterEncoding( 0107, COSName.getPDFName( "G" ) );
   54           addCharacterEncoding( 0110, COSName.getPDFName( "H" ) );
   55           addCharacterEncoding( 0111, COSName.getPDFName( "I" ) );
   56           addCharacterEncoding( 0352, COSName.getPDFName( "Iacute" ) );
   57           addCharacterEncoding( 0353, COSName.getPDFName( "Icircumflex" ) );
   58           addCharacterEncoding( 0354, COSName.getPDFName( "Idieresis" ) );
   59           addCharacterEncoding( 0355, COSName.getPDFName( "Igrave" ) );
   60           addCharacterEncoding( 0112, COSName.getPDFName( "J" ) );
   61           addCharacterEncoding( 0113, COSName.getPDFName( "K" ) );
   62           addCharacterEncoding( 0114, COSName.getPDFName( "L" ) );
   63           addCharacterEncoding( 0115, COSName.getPDFName( "M" ) );
   64           addCharacterEncoding( 0116, COSName.getPDFName( "N" ) );
   65           addCharacterEncoding( 0204, COSName.getPDFName( "Ntilde" ) );
   66           addCharacterEncoding( 0117, COSName.getPDFName( "O" ) );
   67           addCharacterEncoding( 0316, COSName.getPDFName( "OE" ) );
   68           addCharacterEncoding( 0356, COSName.getPDFName( "Oacute" ) );
   69           addCharacterEncoding( 0357, COSName.getPDFName( "Ocircumflex" ) );
   70           addCharacterEncoding( 0205, COSName.getPDFName( "Odieresis" ) );
   71           addCharacterEncoding( 0361, COSName.getPDFName( "Ograve" ) );
   72           addCharacterEncoding( 0257, COSName.getPDFName( "Oslash" ) );
   73           addCharacterEncoding( 0315, COSName.getPDFName( "Otilde" ) );
   74           addCharacterEncoding( 0120, COSName.getPDFName( "P" ) );
   75           addCharacterEncoding( 0121, COSName.getPDFName( "Q" ) );
   76           addCharacterEncoding( 0122, COSName.getPDFName( "R" ) );
   77           addCharacterEncoding( 0123, COSName.getPDFName( "S" ) );
   78           addCharacterEncoding( 0124, COSName.getPDFName( "T" ) );
   79           addCharacterEncoding( 0125, COSName.getPDFName( "U" ) );
   80           addCharacterEncoding( 0362, COSName.getPDFName( "Uacute" ) );
   81           addCharacterEncoding( 0363, COSName.getPDFName( "Ucircumflex" ) );
   82           addCharacterEncoding( 0206, COSName.getPDFName( "Udieresis" ) );
   83           addCharacterEncoding( 0364, COSName.getPDFName( "Ugrave" ) );
   84           addCharacterEncoding( 0126, COSName.getPDFName( "V" ) );
   85           addCharacterEncoding( 0127, COSName.getPDFName( "W" ) );
   86           addCharacterEncoding( 0130, COSName.getPDFName( "X" ) );
   87           addCharacterEncoding( 0131, COSName.getPDFName( "Y" ) );
   88           addCharacterEncoding( 0331, COSName.getPDFName( "Ydieresis" ) );
   89           addCharacterEncoding( 0132, COSName.getPDFName( "Z" ) );
   90           addCharacterEncoding( 0141, COSName.getPDFName( "a" ) );
   91           addCharacterEncoding( 0207, COSName.getPDFName( "aacute" ) );
   92           addCharacterEncoding( 0211, COSName.getPDFName( "acircumflex" ) );
   93           addCharacterEncoding( 0253, COSName.getPDFName( "acute" ) );
   94           addCharacterEncoding( 0212, COSName.getPDFName( "adieresis" ) );
   95           addCharacterEncoding( 0276, COSName.getPDFName( "ae" ) );
   96           addCharacterEncoding( 0210, COSName.getPDFName( "agrave" ) );
   97           addCharacterEncoding( 046, COSName.getPDFName( "ampersand" ) );
   98           addCharacterEncoding( 0214, COSName.getPDFName( "aring" ) );
   99           addCharacterEncoding( 0136, COSName.getPDFName( "asciicircum" ) );
  100           addCharacterEncoding( 0176, COSName.getPDFName( "asciitilde" ) );
  101           addCharacterEncoding( 052, COSName.getPDFName( "asterisk" ) );
  102           addCharacterEncoding( 0100, COSName.getPDFName( "at" ) );
  103           addCharacterEncoding( 0213, COSName.getPDFName( "atilde" ) );
  104           addCharacterEncoding( 0142, COSName.getPDFName( "b" ) );
  105           addCharacterEncoding( 0134, COSName.getPDFName( "backslash" ) );
  106           addCharacterEncoding( 0174, COSName.getPDFName( "bar" ) );
  107           addCharacterEncoding( 0173, COSName.getPDFName( "braceleft" ) );
  108           addCharacterEncoding( 0175, COSName.getPDFName( "braceright" ) );
  109           addCharacterEncoding( 0133, COSName.getPDFName( "bracketleft" ) );
  110           addCharacterEncoding( 0135, COSName.getPDFName( "bracketright" ) );
  111           addCharacterEncoding( 0371, COSName.getPDFName( "breve" ) );
  112           addCharacterEncoding( 0245, COSName.getPDFName( "bullet" ) );
  113           addCharacterEncoding( 0143, COSName.getPDFName( "c" ) );
  114           addCharacterEncoding( 0377, COSName.getPDFName( "caron" ) );
  115           addCharacterEncoding( 0215, COSName.getPDFName( "ccedilla" ) );
  116           addCharacterEncoding( 0374, COSName.getPDFName( "cedilla" ) );
  117           addCharacterEncoding( 0242, COSName.getPDFName( "cent" ) );
  118           addCharacterEncoding( 0366, COSName.getPDFName( "circumflex" ) );
  119           addCharacterEncoding( 072, COSName.getPDFName( "colon" ) );
  120           addCharacterEncoding( 054, COSName.getPDFName( "comma" ) );
  121           addCharacterEncoding( 0251, COSName.getPDFName( "copyright" ) );
  122           addCharacterEncoding( 0333, COSName.getPDFName( "currency1" ) );
  123           addCharacterEncoding( 0144, COSName.getPDFName( "d" ) );
  124           addCharacterEncoding( 0240, COSName.getPDFName( "dagger" ) );
  125           addCharacterEncoding( 0340, COSName.getPDFName( "daggerdbl" ) );
  126           addCharacterEncoding( 0241, COSName.getPDFName( "degree" ) );
  127           addCharacterEncoding( 0254, COSName.getPDFName( "dieresis" ) );
  128           addCharacterEncoding( 0326, COSName.getPDFName( "divide" ) );
  129           addCharacterEncoding( 044, COSName.getPDFName( "dollar" ) );
  130           addCharacterEncoding( 0372, COSName.getPDFName( "dotaccent" ) );
  131           addCharacterEncoding( 0365, COSName.getPDFName( "dotlessi" ) );
  132           addCharacterEncoding( 0145, COSName.getPDFName( "e" ) );
  133           addCharacterEncoding( 0216, COSName.getPDFName( "eacute" ) );
  134           addCharacterEncoding( 0220, COSName.getPDFName( "ecircumflex" ) );
  135           addCharacterEncoding( 0221, COSName.getPDFName( "edieresis" ) );
  136           addCharacterEncoding( 0217, COSName.getPDFName( "egrave" ) );
  137           addCharacterEncoding( 070, COSName.getPDFName( "eight" ) );
  138           addCharacterEncoding( 0311, COSName.getPDFName( "ellipsis" ) );
  139           addCharacterEncoding( 0321, COSName.getPDFName( "emdash" ) );
  140           addCharacterEncoding( 0320, COSName.getPDFName( "endash" ) );
  141           addCharacterEncoding( 075, COSName.getPDFName( "equal" ) );
  142           addCharacterEncoding( 041, COSName.getPDFName( "exclam" ) );
  143           addCharacterEncoding( 0301, COSName.getPDFName( "exclamdown" ) );
  144           addCharacterEncoding( 0146, COSName.getPDFName( "f" ) );
  145           addCharacterEncoding( 0336, COSName.getPDFName( "fi" ) );
  146           addCharacterEncoding( 065, COSName.getPDFName( "five" ) );
  147           addCharacterEncoding( 0337, COSName.getPDFName( "fl" ) );
  148           addCharacterEncoding( 0304, COSName.getPDFName( "florin" ) );
  149           addCharacterEncoding( 064, COSName.getPDFName( "four" ) );
  150           addCharacterEncoding( 0332, COSName.getPDFName( "fraction" ) );
  151           addCharacterEncoding( 0147, COSName.getPDFName( "g" ) );
  152           addCharacterEncoding( 0247, COSName.getPDFName( "germandbls" ) );
  153           addCharacterEncoding( 0140, COSName.getPDFName( "grave" ) );
  154           addCharacterEncoding( 076, COSName.getPDFName( "greater" ) );
  155           addCharacterEncoding( 0307, COSName.getPDFName( "guillemotleft" ) );
  156           addCharacterEncoding( 0310, COSName.getPDFName( "guillemotright" ) );
  157           addCharacterEncoding( 0334, COSName.getPDFName( "guilsinglleft" ) );
  158           addCharacterEncoding( 0335, COSName.getPDFName( "guilsinglright" ) );
  159           addCharacterEncoding( 0150, COSName.getPDFName( "h" ) );
  160           addCharacterEncoding( 0375, COSName.getPDFName( "hungarumlaut" ) );
  161           addCharacterEncoding( 055, COSName.getPDFName( "hyphen" ) );
  162           addCharacterEncoding( 0151, COSName.getPDFName( "i" ) );
  163           addCharacterEncoding( 0222, COSName.getPDFName( "iacute" ) );
  164           addCharacterEncoding( 0224, COSName.getPDFName( "icircumflex" ) );
  165           addCharacterEncoding( 0225, COSName.getPDFName( "idieresis" ) );
  166           addCharacterEncoding( 0223, COSName.getPDFName( "igrave" ) );
  167           addCharacterEncoding( 0152, COSName.getPDFName( "j" ) );
  168           addCharacterEncoding( 0153, COSName.getPDFName( "k" ) );
  169           addCharacterEncoding( 0154, COSName.getPDFName( "l" ) );
  170           addCharacterEncoding( 074, COSName.getPDFName( "less" ) );
  171           addCharacterEncoding( 0302, COSName.getPDFName( "logicalnot" ) );
  172           addCharacterEncoding( 0155, COSName.getPDFName( "m" ) );
  173           addCharacterEncoding( 0370, COSName.getPDFName( "macron" ) );
  174           addCharacterEncoding( 0265, COSName.getPDFName( "mu" ) );
  175           addCharacterEncoding( 0156, COSName.getPDFName( "n" ) );
  176           addCharacterEncoding( 071, COSName.getPDFName( "nine" ) );
  177           addCharacterEncoding( 0226, COSName.getPDFName( "ntilde" ) );
  178           addCharacterEncoding( 043, COSName.getPDFName( "numbersign" ) );
  179           addCharacterEncoding( 0157, COSName.getPDFName( "o" ) );
  180           addCharacterEncoding( 0227, COSName.getPDFName( "oacute" ) );
  181           addCharacterEncoding( 0231, COSName.getPDFName( "ocircumflex" ) );
  182           addCharacterEncoding( 0232, COSName.getPDFName( "odieresis" ) );
  183           addCharacterEncoding( 0317, COSName.getPDFName( "oe" ) );
  184           addCharacterEncoding( 0376, COSName.getPDFName( "ogonek" ) );
  185           addCharacterEncoding( 0230, COSName.getPDFName( "ograve" ) );
  186           addCharacterEncoding( 061, COSName.getPDFName( "one" ) );
  187           addCharacterEncoding( 0273, COSName.getPDFName( "ordfeminine" ) );
  188           addCharacterEncoding( 0274, COSName.getPDFName( "ordmasculine" ) );
  189           addCharacterEncoding( 0277, COSName.getPDFName( "oslash" ) );
  190           addCharacterEncoding( 0233, COSName.getPDFName( "otilde" ) );
  191           addCharacterEncoding( 0160, COSName.getPDFName( "p" ) );
  192           addCharacterEncoding( 0246, COSName.getPDFName( "paragraph" ) );
  193           addCharacterEncoding( 050, COSName.getPDFName( "parenleft" ) );
  194           addCharacterEncoding( 051, COSName.getPDFName( "parenright" ) );
  195           addCharacterEncoding( 045, COSName.getPDFName( "percent" ) );
  196           addCharacterEncoding( 056, COSName.getPDFName( "period" ) );
  197           addCharacterEncoding( 0341, COSName.getPDFName( "periodcentered" ) );
  198           addCharacterEncoding( 0344, COSName.getPDFName( "perthousand" ) );
  199           addCharacterEncoding( 053, COSName.getPDFName( "plus" ) );
  200           addCharacterEncoding( 0261, COSName.getPDFName( "plusminus" ) );
  201           addCharacterEncoding( 0161, COSName.getPDFName( "q" ) );
  202           addCharacterEncoding( 077, COSName.getPDFName( "question" ) );
  203           addCharacterEncoding( 0300, COSName.getPDFName( "questiondown" ) );
  204           addCharacterEncoding( 042, COSName.getPDFName( "quotedbl" ) );
  205           addCharacterEncoding( 0343, COSName.getPDFName( "quotedblbase" ) );
  206           addCharacterEncoding( 0322, COSName.getPDFName( "quotedblleft" ) );
  207           addCharacterEncoding( 0323, COSName.getPDFName( "quotedblright" ) );
  208           addCharacterEncoding( 0324, COSName.getPDFName( "quoteleft" ) );
  209           addCharacterEncoding( 0325, COSName.getPDFName( "quoteright" ) );
  210           addCharacterEncoding( 0342, COSName.getPDFName( "quotesinglbase" ) );
  211           addCharacterEncoding( 047, COSName.getPDFName( "quotesingle" ) );
  212           addCharacterEncoding( 0162, COSName.getPDFName( "r" ) );
  213           addCharacterEncoding( 0250, COSName.getPDFName( "registered" ) );
  214           addCharacterEncoding( 0373, COSName.getPDFName( "ring" ) );
  215           addCharacterEncoding( 0163, COSName.getPDFName( "s" ) );
  216           addCharacterEncoding( 0244, COSName.getPDFName( "section" ) );
  217           addCharacterEncoding( 073, COSName.getPDFName( "semicolon" ) );
  218           addCharacterEncoding( 067, COSName.getPDFName( "seven" ) );
  219           addCharacterEncoding( 066, COSName.getPDFName( "six" ) );
  220           addCharacterEncoding( 057, COSName.getPDFName( "slash" ) );
  221           addCharacterEncoding( 040, COSName.getPDFName( "space" ) );
  222           addCharacterEncoding( 0243, COSName.getPDFName( "sterling" ) );
  223           addCharacterEncoding( 0164, COSName.getPDFName( "t" ) );
  224           addCharacterEncoding( 063, COSName.getPDFName( "three" ) );
  225           addCharacterEncoding( 0367, COSName.getPDFName( "tilde" ) );
  226           addCharacterEncoding( 0252, COSName.getPDFName( "trademark" ) );
  227           addCharacterEncoding( 062, COSName.getPDFName( "two" ) );
  228           addCharacterEncoding( 0165, COSName.getPDFName( "u" ) );
  229           addCharacterEncoding( 0234, COSName.getPDFName( "uacute" ) );
  230           addCharacterEncoding( 0236, COSName.getPDFName( "ucircumflex" ) );
  231           addCharacterEncoding( 0237, COSName.getPDFName( "udieresis" ) );
  232           addCharacterEncoding( 0235, COSName.getPDFName( "ugrave" ) );
  233           addCharacterEncoding( 0137, COSName.getPDFName( "underscore" ) );
  234           addCharacterEncoding( 0166, COSName.getPDFName( "v" ) );
  235           addCharacterEncoding( 0167, COSName.getPDFName( "w" ) );
  236           addCharacterEncoding( 0170, COSName.getPDFName( "x" ) );
  237           addCharacterEncoding( 0171, COSName.getPDFName( "y" ) );
  238           addCharacterEncoding( 0330, COSName.getPDFName( "ydieresis" ) );
  239           addCharacterEncoding( 0264, COSName.getPDFName( "yen" ) );
  240           addCharacterEncoding( 0172, COSName.getPDFName( "z" ) );
  241           addCharacterEncoding( 060, COSName.getPDFName( "zero" ) );
  242       }
  243   
  244       /**
  245        * Convert this standard java object to a COS object.
  246        *
  247        * @return The cos object that matches this Java object.
  248        */
  249       public COSBase getCOSObject()
  250       {
  251           return COSName.MAC_ROMAN_ENCODING;
  252       }
  253   }

Home » pdfbox-1.1.0-src » org.apache.pdfbox.encoding » [javadoc | source]