定制 smalot/pdfparser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

smalot/pdfparser

最新稳定版本:v2.12.2

Composer 安装命令:

composer require smalot/pdfparser

包简介

Pdf parser library. Can read and extract information from pdf file.

README 文档

README

Version CI CS Scrutinizer Code Quality Downloads

The smalot/pdfparser is a standalone PHP package that provides various tools to extract data from PDF files.

This library is under active maintenance. There is no active development by the author of this library (at the moment), but we welcome any pull request adding/extending functionality! See CONTRIBUTING.md for further information about how to contribute.

Features

  • Load/parse objects and headers
  • Extract metadata (author, description, ...)
  • Extract text from ordered pages
  • Support of compressed PDFs
  • Support of MAC OS Roman charset encoding
  • Handling of hexa and octal encoding in text sections
  • Create custom configurations (see CustomConfig.md).

Currently, secured documents and extracting form data are not supported.

License

This library is under the LGPLv3 license.

Install

This library requires PHP 7.1+ since v1. You can install it via Composer:

composer require smalot/pdfparser

In case you can't use Composer, you can include alt_autoload.php-dist. It will include all required files automatically.

Quick example

<?php

// Parse PDF file and build necessary objects.
$parser = new \Smalot\PdfParser\Parser();
$pdf = $parser->parseFile('/path/to/document.pdf');

$text = $pdf->getText();
echo $text;

Further usage information can be found here.

Documentation

Documentation can be found in the doc folder.

统计信息

  • 总下载量: 30.6M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2687
  • 点击次数: 1
  • 依赖项目数: 209
  • 推荐数: 9

GitHub 信息

  • Stars: 2632
  • Watchers: 82
  • Forks: 567
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2026-01-04