Search by

adachsoft / pdf-contracts

Arkadiusz Adach

Contracts, DTOs, Enums and Value Objects for PDF conversion and text extraction.

Package info

gitlab.com/a.adach/pdf-contracts

Issues

pkg:composer/adachsoft/pdf-contracts

Statistics

Installs: 23

Dependents: 2

Suggesters: 0

Stars: 0

v0.1.1 2026-10-09 05:41 UTC

This package is not auto-updated.

Last update: 2026-10-09 03:44:06 UTC


README

PDF Contracts provides contracts, DTOs, enums, collections, exceptions, and value objects for PDF conversion, page editing, and text extraction workflows.

Features

  • Converter and extractor interfaces for integrating PDF implementations.
  • Page editor contracts for adding, removing, and replacing pages.
  • Immutable DTOs for conversion, extraction, and page-editing options and results.
  • Enums for PDF formats, page sizes, orientations, page sources, and insertion positions.
  • Value objects for margins, page numbers, and page ranges.

Installation

Install the package with Composer:

composer require adachsoft/pdf-contracts

The package provides PSR-4 autoloading for the AdachSoft\\PdfContracts namespace.

Usage

Create immutable value objects and pass them to an implementation of the provided contracts:

use AdachSoft\\PdfContracts\\Vo\\PdfMarginsVo;

$margins = PdfMarginsVo::createUniform(12.5);

More focused examples are available in docs/examples/.

Requirements

  • PHP 8.3 or newer.

License

This library is released under the MIT License. See LICENSE for details.