I am needing a Python script that I can use to merge a large amount of PDF documents into even page amounts. The script will be called from the command line and I need to pass it 4 arguments
1) Source Folder
2) Destination Folder
3) Destination File Name Base
4) Record Split Amount
Using the details I will then need to assemble the PDFs using PyPDF2. The trick of the script is going to be to write one destination file at a time. Currently I am doing a two step process. I have a script which uses PyPDF2 to combine all the PDFs in a folder and then a separate script splits that large PDF into the page split amounts I need. The problem with this approach is that Python crashes when dealing with PDFs that are very large (say 4GB)
What needs to happen is to use PyPDF2 to look in the passed source folder. We then need to create a new pdf and read the source PDFs into that new pdf until we hit the Record limit that we pass by the command line. When that happens save that new pdf off and then create a new one. The Combined / new PDFs also need to have a file number appended to the file name that is passed by command line argument.
Attached is an exmple of the source and completed records that I would like to be created by calling this script
Example: python [login to view URL] "Source Folder" "Destination Folder" "Destination File Name Base" "Record Split Amount"
python [login to view URL] "/var/tmp/" "/var/tmp/done/" "COMBINED_TEST" "2000"
Hello sir
Thanks for job posting.
I got your idea from job description and am interested in this job. I think the issue would be resolved by adding the except handling. I can start the work right now.
Best,
Zhang
Hi, I’m a Web Designer/Developer from the UK. My name is Mike. Your project description sounds interesting to me and I do have skills & experience that are required to complete this project. Let's have a quick chat when you're online.
Lets do this. Me and my team has 5 years of experience into Python/Django,Selenium & Data Scraping or Web Crawling. Can very well execute this Project and can work at US hours.