Added scripts

This commit is contained in:
2026-03-16 18:50:45 +01:00
parent 3bc5f6055b
commit 503f2dbe91
5 changed files with 177 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import argparse
import fitz
def join_files(first_pdf, second_pdf, output_pdf):
doc = fitz.open()
doc.insert_file(first_pdf)
doc.insert_file(second_pdf)
doc.save(output_pdf)
doc.close()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Join two PDFs into a third PDF")
parser.add_argument("first_pdf", help="Path to the first PDF file.")
parser.add_argument("second_pdf", help="Path to the second PDF file.")
parser.add_argument("output_pdf", help="Path to destination PDF file.")
args = parser.parse_args()
join_files(args.first_pdf, args.second_pdf, args.output_pdf)