Code cleanup.
parent
f9079e4c0a
commit
4b2beba398
|
@ -26,22 +26,21 @@ from utils import decode_text
|
|||
class PDFNoValidXRef(PDFSyntaxError):
|
||||
pass
|
||||
|
||||
|
||||
class PDFNoOutlines(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFDestinationNotFound(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFEncryptionError(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFPasswordIncorrect(PDFEncryptionError):
|
||||
pass
|
||||
|
||||
class PDFTextExtractionNotAllowed(PDFEncryptionError):
|
||||
pass
|
||||
|
||||
# some predefined literals and keywords.
|
||||
LITERAL_OBJSTM = LIT('ObjStm')
|
||||
LITERAL_XREF = LIT('XRef')
|
||||
|
|
|
@ -29,7 +29,6 @@ from utils import mult_matrix, MATRIX_IDENTITY
|
|||
class PDFResourceError(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFInterpreterError(PDFException):
|
||||
pass
|
||||
|
||||
|
|
|
@ -7,15 +7,13 @@ from pdftypes import int_value, list_value, dict_value
|
|||
from pdfparser import PDFParser
|
||||
from pdfdocument import PDFDocument
|
||||
from pdfdocument import PDFEncryptionError
|
||||
from pdfdocument import PDFTextExtractionNotAllowed
|
||||
|
||||
# some predefined literals and keywords.
|
||||
LITERAL_PAGE = LIT('Page')
|
||||
LITERAL_PAGES = LIT('Pages')
|
||||
|
||||
|
||||
class PDFTextExtractionNotAllowed(PDFEncryptionError):
|
||||
pass
|
||||
|
||||
## PDFPage
|
||||
##
|
||||
class PDFPage(object):
|
||||
|
|
|
@ -25,23 +25,18 @@ LITERALS_DCT_DECODE = (LIT('DCTDecode'), LIT('DCT'))
|
|||
class PDFObject(PSObject):
|
||||
pass
|
||||
|
||||
|
||||
class PDFException(PSException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFTypeError(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFValueError(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFObjectNotFound(PDFException):
|
||||
pass
|
||||
|
||||
|
||||
class PDFNotImplementedError(PDFException):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue