commit
53997967e6
|
@ -25,6 +25,7 @@ class BitParser(object):
|
|||
@classmethod
|
||||
def add(klass, root, v, bits):
|
||||
p = root
|
||||
b = None
|
||||
for i in xrange(len(bits)):
|
||||
if 0 < i:
|
||||
if p[b] is None:
|
||||
|
|
|
@ -12,16 +12,15 @@ More information is available on the Adobe website:
|
|||
"""
|
||||
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
import os.path
|
||||
import gzip
|
||||
import cPickle as pickle
|
||||
import struct
|
||||
from psparser import PSStackParser
|
||||
from psparser import PSException, PSSyntaxError, PSTypeError, PSEOF
|
||||
from psparser import PSLiteral, PSKeyword
|
||||
from psparser import literal_name, keyword_name
|
||||
from psparser import PSSyntaxError, PSEOF
|
||||
from psparser import PSLiteral
|
||||
from psparser import literal_name
|
||||
from encodingdb import name2unicode
|
||||
from utils import choplist, nunpack
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from pdfdevice import PDFDevice, PDFTextDevice
|
||||
from pdfdevice import PDFTextDevice
|
||||
from pdffont import PDFUnicodeNotDefined
|
||||
from layout import LTContainer, LTPage, LTText, LTLine, LTRect, LTCurve
|
||||
from layout import LTFigure, LTImage, LTChar, LTTextLine
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
import cStringIO
|
||||
import logging
|
||||
import sys
|
||||
import struct
|
||||
import os, os.path
|
||||
from pdftypes import LITERALS_DCT_DECODE
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from utils import INF, Plane, get_bound, uniq, csort, fsplit
|
||||
from utils import bbox2str, matrix2str, apply_matrix_pt
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from utils import mult_matrix, translate_matrix
|
||||
from utils import enc, bbox2str
|
||||
from pdffont import PDFUnicodeNotDefined
|
||||
|
|
|
@ -11,8 +11,8 @@ from psparser import literal_name
|
|||
from psparser import LIT, KWD, STRICT
|
||||
from pdftypes import PDFException, PDFTypeError, PDFNotImplementedError
|
||||
from pdftypes import PDFObjectNotFound, PDFStream
|
||||
from pdftypes import resolve1, decipher_all
|
||||
from pdftypes import int_value, float_value, num_value
|
||||
from pdftypes import decipher_all
|
||||
from pdftypes import int_value
|
||||
from pdftypes import str_value, list_value, dict_value, stream_value
|
||||
from pdfparser import PDFSyntaxError
|
||||
from pdfparser import PDFStreamParser
|
||||
|
|
|
@ -8,12 +8,12 @@ except ImportError:
|
|||
from cmapdb import CMapDB, CMapParser, FileUnicodeMap, CMap
|
||||
from encodingdb import EncodingDB, name2unicode
|
||||
from psparser import PSStackParser
|
||||
from psparser import PSSyntaxError, PSEOF
|
||||
from psparser import PSEOF
|
||||
from psparser import LIT, KWD, STRICT
|
||||
from psparser import PSLiteral, literal_name
|
||||
from pdftypes import PDFException, resolve1
|
||||
from pdftypes import int_value, float_value, num_value
|
||||
from pdftypes import str_value, list_value, dict_value, stream_value
|
||||
from pdftypes import int_value, num_value
|
||||
from pdftypes import list_value, dict_value, stream_value
|
||||
from fontmetrics import FONT_METRICS
|
||||
from utils import apply_matrix_norm, nunpack, choplist
|
||||
|
||||
|
|
|
@ -6,20 +6,16 @@ try:
|
|||
except ImportError:
|
||||
from StringIO import StringIO
|
||||
from cmapdb import CMapDB, CMap
|
||||
from psparser import PSException, PSTypeError, PSEOF
|
||||
from psparser import PSTypeError, PSEOF
|
||||
from psparser import PSKeyword, literal_name, keyword_name
|
||||
from psparser import PSStackParser
|
||||
from psparser import LIT, KWD, STRICT
|
||||
from pdftypes import PDFException, PDFStream, PDFObjRef
|
||||
from pdftypes import resolve1
|
||||
from pdftypes import int_value, float_value, num_value
|
||||
from pdftypes import str_value, list_value, dict_value, stream_value
|
||||
from pdftypes import list_value, dict_value, stream_value
|
||||
from pdffont import PDFFontError
|
||||
from pdffont import PDFType1Font, PDFTrueTypeFont, PDFType3Font
|
||||
from pdffont import PDFCIDFont
|
||||
from pdfparser import PDFParser
|
||||
from pdfdocument import PDFDocument
|
||||
from pdfdocument import PDFPasswordIncorrect
|
||||
from pdfcolor import PDFColorSpace
|
||||
from pdfcolor import PREDEFINED_COLORSPACE
|
||||
from pdfcolor import LITERAL_DEVICE_GRAY, LITERAL_DEVICE_RGB
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from psparser import LIT, KWD, STRICT
|
||||
from psparser import LIT
|
||||
from pdftypes import PDFObjectNotFound
|
||||
from pdftypes import resolve1
|
||||
from pdftypes import int_value, float_value, num_value
|
||||
from pdftypes import str_value, list_value, dict_value, stream_value
|
||||
from pdftypes import int_value, list_value, dict_value
|
||||
from pdfparser import PDFParser
|
||||
from pdfdocument import PDFDocument
|
||||
from pdfdocument import PDFEncryptionError
|
||||
|
|
|
@ -9,8 +9,8 @@ from psparser import PSSyntaxError, PSEOF
|
|||
from psparser import KWD, STRICT
|
||||
from pdftypes import PDFException
|
||||
from pdftypes import PDFStream, PDFObjRef
|
||||
from pdftypes import int_value, float_value, num_value
|
||||
from pdftypes import str_value, list_value, dict_value, stream_value
|
||||
from pdftypes import int_value
|
||||
from pdftypes import dict_value
|
||||
|
||||
|
||||
## Exceptions
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
import zlib
|
||||
from lzw import lzwdecode
|
||||
from ascii85 import ascii85decode, asciihexdecode
|
||||
from runlength import rldecode
|
||||
from ccitt import ccittfaxdecode
|
||||
from psparser import PSException, PSObject
|
||||
from psparser import LIT, KWD, STRICT
|
||||
from psparser import LIT, STRICT
|
||||
from utils import apply_png_predictor
|
||||
|
||||
LITERAL_CRYPT = LIT('Crypt')
|
||||
|
|
|
@ -10,7 +10,6 @@ by Philip J. Erdelsky:
|
|||
|
||||
"""
|
||||
|
||||
import sys
|
||||
import struct
|
||||
|
||||
def KEYLENGTH(keybits): return (keybits)/8
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# * public domain *
|
||||
#
|
||||
|
||||
import sys
|
||||
|
||||
def rldecode(data):
|
||||
"""
|
||||
RunLength decoder (Adobe version) implementation based on PDF Reference
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import sys
|
||||
|
||||
def prof_main(argv):
|
||||
import getopt
|
||||
import hotshot, hotshot.stats
|
||||
def usage():
|
||||
print 'usage: %s module.function [args ...]' % argv[0]
|
||||
|
|
Loading…
Reference in New Issue