2017 © Pedro Peláez
 

library pdfinfo

simple php wrapper for pdfinfo

image

howtomakeaturn/pdfinfo

simple php wrapper for pdfinfo

  • Thursday, April 6, 2017
  • by howtomakeaturn
  • Repository
  • 3 Watchers
  • 31 Stars
  • 13,777 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 12 Forks
  • 3 Open issues
  • 8 Versions
  • 17 % Grown

The README.md

Simple PHP wrapper to the pdfinfo unix tool., (*1)

Inspired by http://stackoverflow.com/questions/14644353/get-the-number-of-pages-in-a-pdf-document/14644354, (*2)

What is pdfinfo

pdfinfo is an unix tool helping extract information from pdf files., (*3)

http://linuxcommand.org/man_pages/pdfinfo1.html, (*4)

You can get page count, title, author..etc via the tool., (*5)

Installation

1. Install pdfinfo

First you need to have pdfinfo in your system., (*6)

For ubuntu, there's an easy way for doing this:, (*7)

sudo apt-get install poppler-utils

2. Install the library

You can just download the file to your project, or install it via composer:, (*8)

composer require "howtomakeaturn/pdfinfo:1.*"

Usage

Just pass the path to the pdf file to the constructor, and you can get metadata from its properties immediately:, (*9)

$pdf = new PDFInfo('path/to/the/pdf');
echo $pdf->title; // Get the title
echo $pdf->pages; // Get the number of pages

Exceptions

This library throws 4 kind of exceptions to represent the official exit codes. * OpenPDFException
* OpenOutputException * PDFPermissionException * OtherException, (*10)

Check the official documentation for more information., (*11)

Reference

Currently this library supports the following metadata:, (*12)

  • title
  • author
  • creator
  • producer
  • creationDate
  • modDate
  • tagged
  • form
  • pages
  • encrypted
  • pageSize
  • fileSize
  • optimized
  • PDFVersion
  • pageRot

The Versions

06/04 2017

dev-master

9999999-dev

simple php wrapper for pdfinfo

  Sources   Download

MIT

The Development Requires

pdf pdfinfo

08/03 2016

1.1.3

1.1.3.0

simple php wrapper for pdfinfo

  Sources   Download

MIT

The Development Requires

pdf pdfinfo

02/03 2016

1.1.2

1.1.2.0

simple php wrapper for pdfinfo

  Sources   Download

MIT

The Development Requires

pdf pdfinfo

27/03 2015

1.1.1

1.1.1.0

simple php wrapper for pdfinfo

  Sources   Download

MIT

The Development Requires

pdf pdfinfo

22/03 2015

1.1.0

1.1.0.0

simple php wrapper for pdfinfo

  Sources   Download

The Development Requires

pdf pdfinfo

22/03 2015

1.0.2

1.0.2.0

simple php wrapper for pdfinfo

  Sources   Download

The Development Requires

pdf pdfinfo

21/03 2015

1.0.1

1.0.1.0

simple php wrapper for pdfinfo

  Sources   Download

The Development Requires

pdf pdfinfo

20/03 2015

v1.0.0

1.0.0.0

  Sources   Download

The Development Requires