def writeToStream(self, stream):
# For certain large pdf files, PdfFileWriter.write() causes the error:
# maximum recursion depth exceeded while calling a Python object
# This issue is present in pyPdf as well as PyPDF2 1.23
# We therefore temporarily increase the recursion limit.
old_reclimit = sys.getrecursionlimit()
sys.setrecursionlimit(10000)
self.output.write(stream)
sys.setrecursionlimit(old_reclimit)
评论列表
文章目录