Skip to content

Commit d1d5dfe

Browse files
authored
Add files via upload
1 parent 9bdc2ae commit d1d5dfe

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

BasicPythonScripts/PDF Merger/new.pdf

927 KB
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from PyPDF2 import PdfFileMerger
2+
import os
3+
#using the inbuilt function of library
4+
merger = PdfFileMerger()
5+
#getting all the pdfs as per name/sequence
6+
for items in os.listdir():
7+
#checking that the file selected is pdf only or not
8+
if items.endswith('.pdf'):
9+
merger.append(items)
10+
#making the newly merged file
11+
merger.write("new.pdf")

0 commit comments

Comments
 (0)