• Python 86.8%
  • Jupyter Notebook 9.3%
  • Dockerfile 3.9%
Find a file
DigiToegankelijk NLdoc 7e1918e822 chore: merge 'renovate/kimiworker-8.x' into 'develop'
fix(deps): update dependency kimiworker to v8.0.4

See merge request logius/nldoc/worker/pdf-metadata!104
2025-12-31 10:02:20 +00:00
.vscode fix: upgrade worker 2024-04-30 17:19:53 +02:00
integration_test chore: fixed integration test 2025-12-23 11:57:20 +01:00
.coveragerc chore: added unit tests to get coverage 2024-12-31 15:20:47 +01:00
.editorconfig chore: set .editorconfig 2025-04-21 23:20:14 +00:00
.gitignore feat: added tests, include shared CI from root group 2024-04-03 16:31:04 +02:00
.gitlab-ci.yml chore: removed python image version from ci-cd 2025-12-30 17:56:57 +01:00
CHANGELOG.md chore(release): 4.1.0 2025-12-30 17:04:30 +00:00
CODEOWNERS chore: set CODEOWNERS 2025-04-22 00:25:55 +00:00
conftest.py chore: fixed integration test 2025-12-23 12:07:14 +01:00
CONTRIBUTING.md chore: updated all python 3.12 references 2025-09-23 11:35:46 +02:00
docker-compose.yaml chore: use slim-bookworm 2025-12-31 09:50:33 +01:00
Dockerfile feat(deps): python 3.14.2 and kimiworker 8.0.3 2025-12-30 16:28:06 +01:00
integration.ipynb fix: metadata as one word 2025-04-03 10:47:02 +02:00
LICENSE chore: add correct license 2025-04-15 00:12:03 +02:00
main.py feat!: use configurable bucket names 2025-12-22 15:41:33 +01:00
poetry.lock fix(deps): update dependency kimiworker to v8.0.4 2025-12-31 09:58:05 +00:00
pyproject.toml fix(deps): update dependency kimiworker to v8.0.4 2025-12-31 09:58:05 +00:00
README.md Merge branch 'main' into feature/result-remote-file-storage 2025-11-25 11:27:34 +01:00
renovate.json fix: ci exclude helm-package 2025-09-11 13:32:31 +02:00
test.ipynb chore: update README and add integration test 2025-02-10 11:53:08 +01:00
test_main.py feat!: use configurable bucket names 2025-12-22 15:41:33 +01:00
test_worker.py fix(deps): kimiworker 8.0.2 2025-12-24 09:20:16 +01:00

PDF Metadata

pipeline status coverage report Latest Release

This Python worker extracts metadata from PDF files, gathering information such as basic document details (author, creator, title, subject), technical specifications (PDF version, page count, page size), security features (encryption status, JavaScript presence), and relevant dates (creation and modification dates)

Features

  • Metadata extraction using pdf2image's pdfinfo_from_path
  • Integration with RabbitMQ for message queuing
  • MinIO support for object storage
  • Docker and Kubernetes deployment ready

Getting Started

Local Installation

  1. Clone the repository:

    git clone https://gitlab.com/logius/nldoc/worker/pdf-metadata.git
    cd pdf-metadata
    
  2. Install Poetry (dependency management):

    curl -sSL https://install.python-poetry.org | python3 -
    
  3. Install dependencies:

    poetry install
    
  4. Install shell plugin:

    poetry self add poetry-plugin-shell
    
  5. Activate virtual environment:

    poetry shell
    

Running the Worker

  1. Ensure Docker and Docker Compose are installed (Installation Guide)

  2. Start the services:

    docker compose up
    
  3. Use the included Jupyter notebook integration.ipynb to perform an end to end interaction using Minio and RabbitMQ

  4. Access the management interfaces:

    • RabbitMQ Console: http://localhost:15672/
    • MinIO Console: http://localhost:9001/
  5. Once the docker compose up command has been exited using Ctrl+C, all containers relative to this instance will have shut down automatically.

Running Directly

To run the worker without Docker:

python3 main.py

For configuration options, refer to the Python base worker config.

Testing and Development

Use the included Jupyter notebook test.ipynb to run the metadata extraction on a sample document:

  1. Ensure all dependencies are installed (follow installation steps above)
  2. Launch Jupyter notebook
  3. Open test.ipynb and run the cells to process sample pages

Deployment

Docker Images

Pre-built Docker images are available in our container registry.

Run the latest version:

docker run --rm registry.gitlab.com/logius/nldoc/worker/pdf-metadata:latest

Documentation

License

This project is licensed under the European Union Public License 1.2 - see LICENSE for details.

Acknowledgements