kduma / pdf-scan-splitter-tool
Scanned PDF files splitter and sorter based on barcode
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:project
Requires
- php: ^8.1
- laravel-zero/framework: ^9.2
- nunomaduro/termwind: ^1.14
- spatie/temporary-directory: ^2.1
Requires (Dev)
- laravel/pint: ^1.2
- mockery/mockery: ^1.4.4
- pestphp/pest: ^1.21.3
README
Scanned PDF files splitter and sorter based on barcode
Check full documentation on: https://opensource.duma.sh/apps/pdf-scan-splitter
pss
tool
This tool reads every PDF provided as an argument, splits every page into separate PDF and looks for a Code-128 barcode on each page.
If a barcode is found, the page is saved into a file named after the barcode into the output directory.
If no barcode is found, the page is saved into a file named UNKNOWN.pdf
.
If there are multiple barcodes on a page, the page is saved into a file named after first barcode.
If there is multiple pages with the same barcode, the pages are saved into a file with a number suffix for duplicates.
WARNING: Files already existing in the output directory will be overwritten!
./pss process <output_dir> <pdf> [<pdf>...] <--dpi=200>
composer setup
composer global require kduma/pdf-scan-splitter-tool
Tool will be available globally as pss
command.
Requirements
This tool is based on poppler-utils
and zbar-tools
packages.
Those packages are run in a docker container, so you don't need to install them on your system, but you need to have docker installed.