Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class PdfMerger:
def __init__(self, outputFileName):
self._merger = PdfFileMerger()
self._outputFileName = outputFileName
def append(self, pdf):
self._merger.append(fileobj=pdf.fileObject, pages=(pdf.currentPage, pdf.currentPage + 1))
def write(self):
self._merger.write(self._outputFileName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment