定制 karkowg/php-mupdf 二次开发

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

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

karkowg/php-mupdf

Composer 安装命令:

composer require karkowg/php-mupdf

包简介

Minimal PDF to image converter using MuPDF

README 文档

README

Package banner

php-mupdf

Minimal PDF to image converter using MuPDF. Heavily inspired by spatie/image-to-pdf.

Latest Version on Packagist GitHub Tests Action Status License Total Downloads

Install

Via Composer

$ composer require karkowg/php-mupdf

Usage

Convert all the pages to jpg

$pdf = new Karkow\MuPdf\Pdf('path/to/pdf/file');

$pdf->saveAllPagesAsImages('./images/', 'page-');

Convert a single page to png

$pdf = new Karkow\MuPdf\Pdf('path/to/pdf/file');

$pdf
    ->setPage(2)
    ->setOutputFormat('png')
    ->saveImage('./images/page-2.png');

Please refer to tests/PdfTest.php for other use cases.

mutool

A compiled binary (v1.20.0) is available at bin/mutool. If for any reason you want/need to use your own installation, you can do so by passing its path as a 2nd argument to the constructor.

$pdf = new Karkow\MuPdf\Pdf('path/to/pdf/file', 'path/to/mutool');

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email karkowg@gmail.com instead of using the issue tracker.

Credits

License

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

统计信息

  • 总下载量: 3.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固