Skip to content

Monitors a directory and merge pdf files based on naming pattern, used for my scan-workflow

License

Notifications You must be signed in to change notification settings

rverst/pdfmerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdfmerge

automation build status

TL;DR
A docker-container that watches for incoming files (incrond) and merges them together (using qpdf) if needed.

The reason I created this project, is a scanner (HP OfficeJet) whose duplex unit sucks. It can’t handle folded sheets well (paperjam in 8 out of 10 cases). So I need to scan the odd and even pages separately and merge them together afterwards.
The docker-container is running on my NAS (QNAP TS-251+) and watches for new files in a mounted volume, in which the scanner saves it files. The files are prefixed based on scan-profiles and merged based on these prefixes.
For convenience I reverse the order of the even pages and rotate them by 180 degree during the merge process. Doing that I can simply take the scanned pages from the output tray and put them back to the input feeder without the need to rotate and reorder them.

Example usage:

> docker pull rverst/pdfmerge
> docker run -v /scan_folder:/input \
             -v /scan_folder:/output \
             rverst/pdfmerge:latest

Note that the script runs as UID 1000 and GID 1000 by default. These may be altered with the PUID and PGID environment variables.

Environment variables:

  • PUID - UID to use
  • GUID - GID to use
  • WAIT_TIMEOUT - timeout in sec. the script waits for a file to close. Should not be to short since some scanners create the file at the beginning of the scan.
  • ROTATE_ODD - rotate the odd pages
  • ROTATE_EVEN - rotate the even pages
  • REVERSE_EVEN - reverse the order of the even pages

Alternatives:

About

Monitors a directory and merge pdf files based on naming pattern, used for my scan-workflow

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published