Permalink
Browse files

Added support for new strict/relaxed version of PdfFileReader; defaul…

…ts to strict.
  • Loading branch information...
knowah committed Mar 13, 2012
1 parent 693f759 commit 1e352334c7ce5fa509ce90a790814b5e589a9a8e
Showing with 3 additions and 2 deletions.
  1. +3 −2 PyPDF2/merger.py
View
@@ -49,7 +49,7 @@ class PdfFileMerger(object):
usage information.
"""
- def __init__(self):
+ def __init__(self, strict=True):
"""
>>> PdfFileMerger()
@@ -61,6 +61,7 @@ def __init__(self):
self.bookmarks = []
self.named_dests = []
self.id_count = 0
+ self.strict = strict
def merge(self, position, fileobj, bookmark=None, pages=None, import_bookmarks=True):
"""
@@ -87,7 +88,7 @@ def merge(self, position, fileobj, bookmark=None, pages=None, import_bookmarks=T
pdfr = fileobj
fileobj = pdfr.file
else:
- pdfr = PdfFileReader(fileobj)
+ pdfr = PdfFileReader(fileobj, strict=self.strict)
# Find the range of pages to merge
if pages == None:

0 comments on commit 1e35233

Please sign in to comment.