merge pdfs code example
Example 1: linux merge two pdfs
pdfunite file1.pdf file2.pdf merged.pdf
Example 2: python merge pdfs
from PyPDF2 import PdfFileMerger, PdfFileReader
merger = PdfFileMerger()
merger.append(PdfFileReader(open(filename1, 'rb')))
merger.append(PdfFileReader(open(filename2, 'rb')))
merger.write("merged.pdf")
Example 3: pdftk merge pdf
pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf