Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shosta/merge-pdfs
Merge Pdfs automatically in a folder based on the file names.
https://github.com/shosta/merge-pdfs
pdf-files python scanner utility
Last synced: about 1 month ago
JSON representation
Merge Pdfs automatically in a folder based on the file names.
- Host: GitHub
- URL: https://github.com/shosta/merge-pdfs
- Owner: Shosta
- License: mpl-2.0
- Created: 2017-08-09T12:23:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T13:48:41.000Z (about 7 years ago)
- Last Synced: 2024-10-27T10:58:10.664Z (3 months ago)
- Topics: pdf-files, python, scanner, utility
- Language: Python
- Homepage:
- Size: 4.17 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Merge Pdfs
---A python module to merge a bunch of Pdf files.
---
### Why would you want to merge bunch of pdf files?A few months ago now, I purchased this mobile scanner .
[The IRIScan Anywhere](http://www.irislink.com/EN-FR/c1486/IRIScan-Anywhere-5---IRIScan-Anywhere-5-Wifi---Cordless-Scanner.aspx=) scanner.![IRIScan Anywhere 5](/READMEImages/iriscanWebsitePhoto.png)
This scanner is very portable and I am using it very often to scan all sort of documents I am receiving over mail and that I want to archive to be sure that I have a digital copy.
It is also useful to scan and store the receipt I receive from stores.
###### but
The scanner can't merge files during scanning. It must be done on post-processing through their software.
That's why I wanted to **automate** the process a little.
---
### 1. Prepare your files.
Let's consider that you scan (or have by any other method) a lot of different pdf files.
You need to rename your files according to the following pattern :
> "_file name1 - part1.pdf_"
>
> ...
>
> "_file name1 - partN.pdf_"
>
> "_file name2 - part1.pdf_"
>
> ...
>
> "_file name2 - partN.pdf_"See a folder that is properly prepared on the image below :
![Scanned Images Folder](/READMEImages/scannedFilesToMerge.png)
>The files that have the same name ("_file name1_" for instance) are going to be merged together.
### 2. Installation of the required softwares.
As a start, you need to install the PyPDF2 python module to your computer as it is necessary to manipulate the pdf files.
`pip install PyPDF2`
### 3. Call the module
You could then call the module like this, when you are in the folder that has the "_mergepdfs.py_" file :
`mergepdfs.py ./path/to/the/pdf/files/I/want/to/merge `
I use powershell to do this on Windows :
![](/READMEImages/commandToLaunch.png)
and you can see that the files were merged properly.
![](/READMEImages/commandResult.png)
### 4. Enjoy the results
A "result" directory is created to store the merged files.
Then the files are named as were their parts and available in the "result" folder.
![](/READMEImages/scannedFilesMerged.png)
---
Released under the Mozilla Public License, version 2.0
Made with :heart: in Paris :fr: