2017 © Pedro Peláez
 

library pdfvalidate

A simple validation for pdfs

image

ottosmops/pdfvalidate

A simple validation for pdfs

  • Tuesday, May 15, 2018
  • by ottosmops
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Validate a PDF with pdftocairo

GitHub license Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version Packagist Downloads, (*1)

This package provides a very simple PDF Validator. In fact you can only check if the Pdf is readable by pdftocairo without problems., (*2)

$validator = new \Ottosmops\Pdfvalidate\Validator('/path/to/file.pdf');  
if (!$validator->check()) {
    echo $validator->error;
    echo $validator->output; // original information
    exit(1);
} 

// the pdf should be ok
// do something useful ...

This is the command which is used behind the scene: pdftocairo -pdf path/to/file - 2>&1 >/dev/null., (*3)

There are 2 optional parameters: $executable (path to the command); $timeout (in seconds):, (*4)

$validator = new \Ottosmops\Pdfvalidate\Validator($file, $executable = '', $timeout = 60); 

Requirements

The Package uses pdftocairo. Make sure that this is installed: which pdftocairo, (*5)

For Installation see: poppler-utils, (*6)

If the installed binary is not found ("The command "which pdftoppm" failed.") you can pass the full path to the _constructor (see below) or use putenv('PATH=$PATH:/usr/local/bin/:/usr/bin') (with the dir where pdftoppm lives) before you call the class Converter., (*7)

Installation

composer require ottosmops/pdfvalidate

License

The MIT License (MIT). Please see License File for more information., (*8)

The Versions

15/05 2018

dev-master

9999999-dev https://github.com/ottosmops/pdfvalidate

A simple validation for pdfs

  Sources   Download

MIT

The Requires

 

The Development Requires

by ak

validation pdf anton ottosmops

15/05 2018

v1.0.1

1.0.1.0 https://github.com/ottosmops/pdfvalidate

A simple validation for pdfs

  Sources   Download

MIT

The Requires

 

The Development Requires

by ak

validation pdf anton ottosmops

14/05 2018

v1.0.0

1.0.0.0 https://github.com/ottosmops/pdfvalidate

A simple validation for pdfs

  Sources   Download

MIT

The Requires

 

The Development Requires

by ak

validation pdf anton ottosmops