Skip to content

kduma-OSS/PHP-pdf-imposition

Repository files navigation

PDF Imposition Toolkit

Latest Version on Packagist Build Status Quality Score Total Downloads

PDF Imposition Toolkit

Installation

You can install the package via composer:

composer require kduma/pdf-imposition

Usage

use Kduma\PdfImposition\LayoutGenerators\AutoGridPageLayoutGenerator;
use Kduma\PdfImposition\LayoutGenerators\Markers\PrinterBoxCutMarkings;
use Kduma\PdfImposition\PdfImposer;
use Kduma\PdfImposition\PdfSource;
use Kduma\PdfImposition\DTO\Size;

$cardSize = Size::make(90, 50);

$layoutGenerator = new AutoGridPageLayoutGenerator($cardSize);
$layoutGenerator->center();

$layoutGenerator = new PrinterBoxCutMarkings($layoutGenerator);

$PdfImposer = new PdfImposer($layoutGenerator);

$cards = (new PdfSource)->read('input.pdf');
$PdfImposer->export($cards, 'output.pdf');

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The GNU GPLv3. Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.