Note: read the PyPDF2 documentation before proceeding. It is not very long.
Add a stamp to a PDF file.
Add a watermark to a PDF file.
#!/usr/bin/python3 # =================================================================== # from: www.youtube.com/watch?v=vEQ8CXFWLZU # 3 Python Automation Projects # ------------------------------------------------------------------- # pip install PyPDF2 # ------------------------------------------------------------------- # http://pypi.org/project/PyPDF2/ # =================================================================== import PyPDF2 import sys import os merger = PyPDF2.PdfFileMerger() for file in os.listdir(os.curdir): if file.endswith('.pdf'): print(file) merger.append(file) merger.write('combined.pdf')