No description
Find a file
2026-03-09 19:33:30 +01:00
bin Initial import 2026-03-09 19:09:09 +01:00
config Initial import 2026-03-09 19:09:09 +01:00
covers Initial import 2026-03-09 19:09:09 +01:00
masks Initial import 2026-03-09 19:09:09 +01:00
.gitignore Initial import 2026-03-09 19:09:09 +01:00
LICENSE.txt doc: add LICENSE.txt 2026-03-09 19:33:30 +01:00
Makefile Initial import 2026-03-09 19:09:09 +01:00
README.md doc: add LICENSE.txt 2026-03-09 19:33:30 +01:00

Maskorium

Maskorium is a small CLI tool that prepares training PDFs for distribution by:

  • applying a watermark mask to every page,
  • prepending a standardized cover page,
  • producing a final exportable PDF.

It is designed for repeatable document packaging workflows where consistency matters.

Why Maskorium

When teams publish many course materials, manual PDF edits are error-prone and slow. Maskorium automates this final packaging step so each document follows the same diffusion policy and visual format.

Typical use cases:

  • training/course handouts,
  • internal distribution copies,
  • branded cover pages,
  • confidentiality and copyright reminders.

Features

  • Add a mask PDF on all pages (--mask).
  • Add a cover PDF as first page (--cover).
  • Use direct file paths or template names from data directories.
  • List available templates with --mask help and --cover help.
  • Keep workflow simple: POSIX shell script + pdftk.

Requirements

  • pdftk which is generally included in most Linux distributions (try apt update && apt install pdftk).

Installation

System-wide install

sudo make install PREFIX=/usr

User-local install

make install PREFIX="$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"

Quick start

List built-in templates:

maskorium --mask help
maskorium --cover help

Generate a packaged PDF:

maskorium \
  --input course.pdf \
  --mask qualiopi.16-9 \
  --cover company.16-9 \
  --output course.release.pdf

Use explicit files instead of template names:

maskorium \
  --input course.pdf \
  --mask ./masks/qualiopi.a4.pdf \
  --cover ./covers/company.a4.pdf \
  --output course.custom.pdf

CLI usage

Usage: maskorium [options]

Options:
  -c, --cover NAME         Use NAME as cover (use 'help' to display available covers)
  -m, --mask NAME          Use NAME as mask (use 'help' to display available masks)
  -i, --input FILE         Use FILE as input file
  -o, --output FILE        Use FILE as output file
  -F, --config-file FILE   Use FILE as config file
  -h, --help               Show this help

Processing order

Maskorium runs transformations in this order:

  1. Apply mask on the input PDF.
  2. Insert cover as first page.

This means the added cover is not watermarked by the masking step.

Configuration

Maskorium resolves templates from DATA_DIR:

  • DATA_DIR/covers
  • DATA_DIR/masks

The provided default config is in config/maskorium.conf:

DATA_DIR="/usr/share/maskorium"

The script also supports config file discovery (for example /etc/maskorium.conf and user-level config paths).

Limitations

  • No PDF encryption.
  • No strong anti-copy protection.
  • No metadata/versioning workflow.

The watermark is primarily informative/legal and process-oriented.

Contributing

Contributions are welcome.

  1. Open an issue for discussion.
  2. Submit a focused pull request with clear rationale.
  3. Include reproducible manual test steps.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).