| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* @file |
| 5 |
* This file is part of the PdfParser library. |
| 6 |
* |
| 7 |
* @author Sébastien MALOT <sebastien@malot.fr> |
| 8 |
* |
| 9 |
* @date 2017-01-03 |
| 10 |
* |
| 11 |
* @license LGPLv3 |
| 12 |
* |
| 13 |
* @url <https://github.com/smalot/pdfparser> |
| 14 |
* |
| 15 |
* PdfParser is a pdf library written in PHP, extraction oriented. |
| 16 |
* Copyright (C) 2017 - Sébastien MALOT <sebastien@malot.fr> |
| 17 |
* |
| 18 |
* This program is free software: you can redistribute it and/or modify |
| 19 |
* it under the terms of the GNU Lesser General Public License as published by |
| 20 |
* the Free Software Foundation, either version 3 of the License, or |
| 21 |
* (at your option) any later version. |
| 22 |
* |
| 23 |
* This program is distributed in the hope that it will be useful, |
| 24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 26 |
* GNU Lesser General Public License for more details. |
| 27 |
* |
| 28 |
* You should have received a copy of the GNU Lesser General Public License |
| 29 |
* along with this program. |
| 30 |
* If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>. |
| 31 |
*/ |
| 32 |
|
| 33 |
// Source : http://www.opensource.apple.com/source/vim/vim-34/vim/runtime/print/mac-roman.ps |
| 34 |
|
| 35 |
namespace Smalot\PdfParser\Encoding; |
| 36 |
|
| 37 |
/** |
| 38 |
* Class MacRomanEncoding |
| 39 |
*/ |
| 40 |
class MacRomanEncoding extends AbstractEncoding |
| 41 |
{ |
| 42 |
public function getTranslations(): array |
| 43 |
{ |
| 44 |
$encoding = |
| 45 |
'.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '. |
| 46 |
'.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '. |
| 47 |
'.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '. |
| 48 |
'.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '. |
| 49 |
'space exclam quotedbl numbersign dollar percent ampersand quotesingle '. |
| 50 |
'parenleft parenright asterisk plus comma minus period slash '. |
| 51 |
'zero one two three four five six seven '. |
| 52 |
'eight nine colon semicolon less equal greater question '. |
| 53 |
'at A B C D E F G '. |
| 54 |
'H I J K L M N O '. |
| 55 |
'P Q R S T U V W '. |
| 56 |
'X Y Z bracketleft backslash bracketright asciicircum underscore '. |
| 57 |
'grave a b c d e f g '. |
| 58 |
'h i j k l m n o '. |
| 59 |
'p q r s t u v w '. |
| 60 |
'x y z braceleft bar braceright asciitilde .notdef '. |
| 61 |
'Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute '. |
| 62 |
'agrave acircumflex adieresis atilde aring ccedilla eacute egrave '. |
| 63 |
'ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute '. |
| 64 |
'ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis '. |
| 65 |
'dagger degree cent sterling section bullet paragraph germandbls '. |
| 66 |
'registered copyright trademark acute dieresis notequal AE Oslash '. |
| 67 |
'infinity plusminus lessequal greaterequal yen mu partialdiff summation '. |
| 68 |
'Pi pi integral ordfeminine ordmasculine Omega ae oslash '. |
| 69 |
'questiondown exclamdown logicalnot radical florin approxequal delta guillemotleft '. |
| 70 |
'guillemotright ellipsis space Agrave Atilde Otilde OE oe '. |
| 71 |
'endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge '. |
| 72 |
'ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl '. |
| 73 |
'daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute '. |
| 74 |
'Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex '. |
| 75 |
'heart Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde '. |
| 76 |
'macron breve dotaccent ring cedilla hungarumlaut ogonek caron'; |
| 77 |
|
| 78 |
return explode(' ', $encoding); |
| 79 |
} |
| 80 |
} |
| 81 |
|