Sign inSign up

less0/duplexify

By less0

•Updated about 2 years ago

A worker application to facilitate scanning documents with simplex scanners.

Image
Integration & delivery
1

1.1K

less0/duplexify repository overview

⁠Summary

duplexify facilitates scanning double-faced documents with a simplex scanner or all-in-one device that only allows simplex scanning. To achieve that, it watches a directory and as soon there are two PDFs present in that directory, it assumes that the first one contains the front-faces and the second one contains the back-faces (in descending order) and then merges them using the Java port⁠ of PDFtk Server⁠.

Disclaimer: At the moment, duplexify it at an early stage, therefor, it is still rough around the edges and not yet suitable for productive scenarios.

⁠Folders and integration

Folders are configurable (see variables section) and default to

FolderExplanation
/app/inThe folder the application watches at.
/app/outThe folder the merged PDFs are written to.
/app/errorThe folder erroneous PDFs are written to. Timestamped subfolders are created for each failed conversion.

⁠Integration with portainer

Since portainer does not allow custom options when you create a CIFS volume and by default a CIFS volume is mounted as root without write access for the restricted user that runs the app, you can run duplexify on portainer using Stacks. Stacks allow you to create a Docker compose file "on the fly" and within that create CIFS volumes with a custom UID.

Example Stack:

services:
  duplexify:
    image: less0/duplexify:latest
    container_name: duplexify_worker
    volumes:
      - in:/app/in 
      - out:/app/out
    restart: unless-stopped

volumes:
  in:
    driver: local
    driver_opts:
      type: "cifs"
      device: "<input network share>" # e.g. //192.168.0.123/duplexify/in
      o: "username=<input network share user>,password=<input network share pass>,vers=2.0,uid=1654,gid=1654"
  out:
    driver: local
    driver_opts:
      type: "cifs"
      device: "<output network share>" # e.g. //192.168.0.123/duplexify/out
      o: "username=<output network share user>,password=<output network share pass>,vers=2.0,uid=1654,gid=1654"

Just replace the parts in the angle brackets with the values suitable for your setup. 1654 is the UID and GID of the user and group app in the image.

⁠Variables

The container supports the following variables to customize the folders:

VariableExplanation
DOTNET_WatchDirectoryThe folder the application watches at.
DOTNET_OutDirectoryThe folder the merged PDFs are written to.
DOTNET_ErrorDirectoryThe folder erroneous PDFs are written to. Timestamped subfolders are created for each failed conversion.

⁠License

duplexify is released under the GNU General Public License v3.0⁠.

Tag summary

Content type

Image

Digest

sha256:2e858817a…

Size

143.4 MB

Last updated

about 2 years ago

docker pull less0/duplexify