jfuentestgn/pdfinfo

PHP Wrapper for pdfinfo command

dev-master 2018-04-10 18:17 UTC

This package is not auto-updated.

Last update: 2024-04-22 13:31:55 UTC


README

Simple class to retrieve basic information from PDF file

This class uses spatie/pdf-to-text and extends it to read metadata from a PDF file. It acts as a wrapper for pdfinfo command.

Requirements

  • PHP >= 5.6.4
  • pdfinfo

Be sure to check if pdfinfo is installed in your system before using this package

Installation

You should use the pdfinfo class with composer, from command line:

$ composer require jfuentestgn/pdfinfo

or declaring it in your project's composer.json file:

{
    "require": {
        "jfuentestgn/pdfinfo": "dev-master"
    }
}

Configuration

No config needed

Usage

You can use the Pdf class in a similar way thay you would do with spatie's one:

use JFuentesTgn\pdfinfo\Pdf;

$info = (new Pdf())->setPdf('dummy.pdf')->info();
print_r($info);

or:

$info = \JFuentesTgn\pdfinfo\Pdf::getInfo('dummy.pdf');

Credits

This package is maintained by Juan Fuentes. It's based on spatie/pdftotext.

License

This package is licensed under The MIT License (MIT).