i used PyPDF2 before and i wrote this class
class pdfWriter:
fh = None
pdf_obj = None
def __init__(self, path):
if(not path.endswith('.pdf')):
path += ".pdf"
self.fh = open(path, 'wb')
self.pdf_obj = PdfFileWriter()
def addPage(self, page):
self.pdf_obj.addPage(page)
def write(self):
self.pdf_obj.write(self.fh)
now i'm trying to achieve the same thing using PyMuPdf but i can't find a method to add a page object to a document object.
Thanks in advance for any help.