baraja-core/php-pdf-to-image

此包最新版本(v2.0.0)无可用许可证信息。

使用PHP将PDF转换为JPG、PNG或GIF。

v2.0.0 2022-10-24 08:27 UTC

README

将PDF转换为图片并保存到磁盘。使用PHP将PDF转换为JPG、PNG或GIF。

📦 安装

建议使用 Composer 进行安装,您也可以在 PackagistGitHub 上找到此包。

要安装,只需使用以下命令

$ composer require baraja-core/php-pdf-to-image

您可以通过创建内部类的实例手动使用此包,或者注册DIC扩展将服务直接链接到Nette框架。

如何使用

$configuration = new Configuration(
	pdfPath: __DIR__ . '/example.pdf',
	savePath: __DIR__ . '/example.jpg',
	format: 'jpg'
);

// Render PDF to image and save to disk.
\Baraja\PdfToImage\Convertor::convert($configuration);

支持的配置选项

📄 许可证

baraja-core/php-pdf-to-image 采用MIT许可证。有关详细信息,请参阅LICENSE 文件。