Code cleanup.

pull/1/head
Yusuke Shinyama 2014-03-24 20:59:24 +09:00
parent f9079e4c0a
commit 4b2beba398
4 changed files with 4 additions and 13 deletions

View File

@ -26,22 +26,21 @@ from utils import decode_text
class PDFNoValidXRef(PDFSyntaxError): class PDFNoValidXRef(PDFSyntaxError):
pass pass
class PDFNoOutlines(PDFException): class PDFNoOutlines(PDFException):
pass pass
class PDFDestinationNotFound(PDFException): class PDFDestinationNotFound(PDFException):
pass pass
class PDFEncryptionError(PDFException): class PDFEncryptionError(PDFException):
pass pass
class PDFPasswordIncorrect(PDFEncryptionError): class PDFPasswordIncorrect(PDFEncryptionError):
pass pass
class PDFTextExtractionNotAllowed(PDFEncryptionError):
pass
# some predefined literals and keywords. # some predefined literals and keywords.
LITERAL_OBJSTM = LIT('ObjStm') LITERAL_OBJSTM = LIT('ObjStm')
LITERAL_XREF = LIT('XRef') LITERAL_XREF = LIT('XRef')

View File

@ -29,7 +29,6 @@ from utils import mult_matrix, MATRIX_IDENTITY
class PDFResourceError(PDFException): class PDFResourceError(PDFException):
pass pass
class PDFInterpreterError(PDFException): class PDFInterpreterError(PDFException):
pass pass

View File

@ -7,15 +7,13 @@ from pdftypes import int_value, list_value, dict_value
from pdfparser import PDFParser from pdfparser import PDFParser
from pdfdocument import PDFDocument from pdfdocument import PDFDocument
from pdfdocument import PDFEncryptionError from pdfdocument import PDFEncryptionError
from pdfdocument import PDFTextExtractionNotAllowed
# some predefined literals and keywords. # some predefined literals and keywords.
LITERAL_PAGE = LIT('Page') LITERAL_PAGE = LIT('Page')
LITERAL_PAGES = LIT('Pages') LITERAL_PAGES = LIT('Pages')
class PDFTextExtractionNotAllowed(PDFEncryptionError):
pass
## PDFPage ## PDFPage
## ##
class PDFPage(object): class PDFPage(object):

View File

@ -25,23 +25,18 @@ LITERALS_DCT_DECODE = (LIT('DCTDecode'), LIT('DCT'))
class PDFObject(PSObject): class PDFObject(PSObject):
pass pass
class PDFException(PSException): class PDFException(PSException):
pass pass
class PDFTypeError(PDFException): class PDFTypeError(PDFException):
pass pass
class PDFValueError(PDFException): class PDFValueError(PDFException):
pass pass
class PDFObjectNotFound(PDFException): class PDFObjectNotFound(PDFException):
pass pass
class PDFNotImplementedError(PDFException): class PDFNotImplementedError(PDFException):
pass pass