kduma/pdf-imposition

v0.1 2020-07-26 19:37 UTC

This package is auto-updated.

Last update: 2024-10-18 02:36:35 UTC


README

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 git@krystian.duma.sh 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.