pointybeard/pdfinfo

PHP Wrapper for pdfinfo

1.0.1 2021-09-07 02:03 UTC

This package is auto-updated.

Last update: 2024-04-07 07:14:27 UTC


README

A PHP wrapper class for pdfinfo which is part of the Poppler PDF rendering library.

Installation

This library is installed via Composer. To install, use composer require pointybeard/pdfinfo or add "pointybeard/pdfinfo": "~1.0.0" to your composer.json file.

And run composer to update your dependencies:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

pdfinfo

pdfinfo, which is part of the Poppler PDF rendering library, must be installed. On ubuntu, this is done with the following command:

apt-get install poppler-utils

Requirements

Usage

Here is a basic usage example:

<?php

declare(strict_types=1);

include "vendor/autoload.php";

use pointybeard\PdfInfo\PdfInfo;

$info = new PdfInfo("test.pdf");

var_dump(
    $info,
    $info->toArray(),
    $info->toJson(),
    (string)$info,
    $info->{"Page size"},
    $info->dimensions(),
    $info->height(),
    $info->width()
);

Support

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

Contributing

We encourage you to contribute to this project. Please check out the Contributing documentation for guidelines about how to get involved.

License

"PHP Wrapper for pdfinfo" is released under the MIT License.