I'm trying to insert two pdfs, the first pdf is the main pdf and the second is the one I'd like to take and append to the first pdf, under the same name. The goal is to open the pdf and append and that's it.
import fitz
doc1 = fitz.open("test1.pdf")
doc2 = fitz.open("test2.pdf")
doc1.insertPDF(doc2)
doc2.save("test2.pdf")
I get the error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\*****\AppData\Roaming\Python\Python37\site-packages\fitz\fitz.py", line 3537, in save
raise ValueError("save to original must be incremental")
ValueError: save to original must be incremental
If there's any other way to do this please let me know, through Python