ottosmops/pdfvalidate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ottosmops/pdfvalidate

Composer 安装命令:

composer require ottosmops/pdfvalidate

包简介

A simple validation for pdfs

README 文档

README

GitHub license Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version Packagist Downloads

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

$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.

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

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

Requirements

The Package uses pdftocairo. Make sure that this is installed: which pdftocairo

For Installation see: poppler-utils

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.

Installation

composer require ottosmops/pdfvalidate

License

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

统计信息

  • 总下载量: 142
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固