Created
May 20, 2022 11:13
-
-
Save harajune/8cc3690bd016e1c66832247e6c8e9481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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