rename package pdflib -> pdfminer.

git-svn-id: https://pdfminerr.googlecode.com/svn/trunk/pdfminer@103 1aa58f4a-7d42-0410-adbc-911cccaed67c
pull/1/head
yusuke.shinyama.dummy 2009-05-16 06:12:01 +00:00
parent fa678ccb98
commit 3e12268bf6
26 changed files with 89 additions and 9 deletions

80
pdfminer/latin2ascii.py Normal file
View File

@ -0,0 +1,80 @@
# latin2ascii.py
LATIN2ASCII = {
# iso-8859-1
0x00c0: 'A`',
0x00c1: "A'",
0x00c2: 'A^',
0x00c3: 'A~',
0x00c4: 'A:',
0x00c5: 'A%',
0x00c6: 'AE',
0x00c7: 'C,',
0x00c8: 'E`',
0x00c9: "E'",
0x00ca: 'E^',
0x00cb: 'E:',
0x00cc: 'I`',
0x00cd: "I'",
0x00ce: 'I^',
0x00cf: 'I:',
0x00d0: "D'",
0x00d1: 'N~',
0x00d2: 'O`',
0x00d3: "O'",
0x00d4: 'O^',
0x00d5: 'O~',
0x00d6: 'O:',
0x00d8: 'O/',
0x00d9: 'U`',
0x00da: "U'",
0x00db: 'U~',
0x00dc: 'U:',
0x00dd: "Y'",
0x00df: 'ss',
0x00e0: 'a`',
0x00e1: "a'",
0x00e2: 'a^',
0x00e3: 'a~',
0x00e4: 'a:',
0x00e5: 'a%',
0x00e6: 'ae',
0x00e7: 'c,',
0x00e8: 'e`',
0x00e9: "e'",
0x00ea: 'e^',
0x00eb: 'e:',
0x00ec: 'i`',
0x00ed: "i'",
0x00ee: 'i^',
0x00ef: 'i:',
0x00f0: "d'",
0x00f1: 'n~',
0x00f2: 'o`',
0x00f3: "o'",
0x00f4: 'o^',
0x00f5: 'o~',
0x00f6: 'o:',
0x00f8: 'o/',
0x00f9: 'o`',
0x00fa: "u'",
0x00fb: 'u~',
0x00fc: 'u:',
0x00fd: "y'",
0x00ff: 'y:',
# Ligatures
0x0152: 'OE',
0x0153: 'oe',
0x0132: 'IJ',
0x0133: 'ij',
0x1d6b: 'ue',
0xfb00: 'ff',
0xfb01: 'fi',
0xfb02: 'fl',
0xfb03: 'ffi',
0xfb04: 'ffl',
0xfb05: 'ft',
0xfb06: 'st',
}

View File

@ -7,7 +7,7 @@ def dumpcdb(cmap, cdbfile, verbose=1):
try:
import cdb
except ImportError:
import pdflib.pycdb as cdb
import pdfminer.pycdb as cdb
m = cdb.cdbmake(cdbfile, cdbfile+'.tmp')
if verbose:
print >>stderr, 'Writing: %r...' % cdbfile
@ -21,7 +21,7 @@ def dumpcdb(cmap, cdbfile, verbose=1):
return
def convert_cmap(files, cmapdir, cdbcmapdir, force=False):
from pdflib.cmap import CMapDB
from pdfminer.cmap import CMapDB
CMapDB.initialize(cmapdir)
for fname in files:
if fname.endswith('.upr'): continue

View File

@ -7,8 +7,8 @@
# -i objid : object id
#
import sys, re
from pdflib.pdfparser import PDFDocument, PDFParser
from pdflib.pdftypes import PDFStream, PDFObjRef, PSKeyword, PSLiteral, resolve1
from pdfminer.pdfparser import PDFDocument, PDFParser
from pdfminer.pdftypes import PDFStream, PDFObjRef, PSKeyword, PSLiteral, resolve1
ESC_PAT = re.compile(r'[\000-\037&<>()\042\047\134\177-\377]')

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python
import sys
from pdflib.pdfparser import PDFDocument, PDFParser
from pdflib.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
from pdflib.converter import SGMLConverter, HTMLConverter, TextConverter, TagExtractor
from pdflib.cmap import CMapDB
from pdfminer.pdfparser import PDFDocument, PDFParser
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
from pdfminer.converter import SGMLConverter, HTMLConverter, TextConverter, TagExtractor
from pdfminer.cmap import CMapDB
# main
def main(argv):

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import sys
from pdflib.sgml import PDFSGMLParser, Document
from sgml import PDFSGMLParser, Document
stdout = sys.stdout
stderr = sys.stderr
try: