Advertisement
elena1234

working with pdf in Python

Feb 15th, 2022
1,224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import PyPDF2
  2.  
  3.  
  4. inputs = "tesla.pdf", "new_document.pdf"
  5.  
  6.  
  7. def pdf_combiner(pdf_list):
  8.     merger = PyPDF2.PdfFileMerger()
  9.     for pdf in pdf_list:
  10.         merger.append(pdf)
  11.  
  12.     merger.write("super.pdf")
  13.  
  14.  
  15. pdf_combiner(inputs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement