kristos80/piima
Composer 安装命令:
composer require kristos80/piima
包简介
A, really, simple utility for working with PDF files
README 文档
README
Piima
A, really, simple utility for working with PDF files.
For now it can do 2 distinct things (see public methods):
- Convert any page of a PDF file to an image
- Calculate the total pages of a PDF file
Dependencies
The package is dependent on ghostscript
Public methods
public static extractImage(string $pdf, string $image, int $page = 1, bool $silent = FALSE) : bool
// Creates an image from the first page of the pdf file // and returns `TRUE` or FALSE or throws an exception $thumbnailCreated = Piima::extractImage($pdf, $image); // Creates an image from the 5th page of the pdf file // and returns `TRUE` or FALSE or throws an exception $thumbnailCreated = Piima::extractImage($pdf, $image, 5); // Creates an image from the 5th page of the pdf file // and returns `TRUE` or `FALSE` without throwing an exception $thumbnailCreated = Piima::extractImage($pdf, $image, 5, TRUE);
public static calculateTotalPages(string $pdf, bool $silent = FALSE): int
// Calculates total page of PDF file as an integer // and returns it or throws an exception Piima::calculateTotalPages($pdf); // Calculates total page of PDF file as an integer // and returns it without throwing an exception Piima::calculateTotalPages($pdf, TRUE);
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-12