Skip to content
Advertisement

Tag: pypdf

Loop through folder and subfolders and merge pdf

I tried to create a script to loop through parent folder and subfolders and merge all of the pdfs into one. Below if the code I wrote so far, but I don’t know how to combine them into one script. Reference: Merge PDF files The first function is to loop through all of the subfolders under parent folder and get

Why does this Traceback error come up in Python?

I am writing something that merges a PDF (in a Supplement folder) with many PDFs (in an Input folder) then saves them into an Output folder. This seems to work once taking the first PDF in the Input folder, merging it with the PDF in the Supplement folder, and saving it into the Output folder without issue. But then gives

How to add watermark in all pages of PDF files with python?

I’m try to adding watermark to every pages of my PDF file.My PDF files have 58 pages but my output file has get only last page in my PDF file. This’s my code: Please tell me how to add watermark all pages. Answer You’re rewriting your “merged” file for each page. Try something like instead.

How to attach mulitple files in PDF?

I have a list of objects: List = [‘Doc1.xlsx’,’Doc2.csv’,’Doc3.pdf’] and a list of their names: List1 = [‘Doc1_name.xlsx’,’Doc2_name.csv’,’Doc3_name.pdf’]. I need to attach them in existing PDF. I tried with the folowing code, which works only if I have one attachement. Now I am trying to iterate over the attachements to attach all of them but in the Final.pdf will be

Writing text over a PDF in python3

I am trying to write some string to a PDF file at some position. I found a way to do this and implemented it like this: It throws me an error at can.save() line The error : Have read up at a lot of places on the internet. Found the same method everywhere. Is it the wrong way to do.

Advertisement