virdiggg/merge-files
最新稳定版本:2.2.0
Composer 安装命令:
composer require virdiggg/merge-files
包简介
Merge words, excel, PDF and image into a single PDF
README 文档
README
Not support image inside docx/doc
I don't plan to update this library in the meantime
mbstring extension is needed
HOW TO USE
- Install this library with composer
composer require virdiggg/merge-files
- Install Ghostscript and make sure it can be called in command promp with
gs. You will get something like this when you typegs.
$ gs
$ GPL Ghostscript 10.04.0 (2024-09-18)
$ GS >
- Create function to call this library
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Virdiggg\MergeFiles\Merge; try { $mf = new Merge(); $mf->setAuthor('Me'); $mf->setCreator('Also Me'); $mf->setOutputName('mergedpdf.pdf'); $mf->setOutputPath(__DIR__ . '/output/'); // $mf->setKeywords(['pdf', 'word', 'excel', 'image']); $mf->setTitle('Merged PDF'); // Mandatory $mf->setSubject('Merged PDF'); // Mandatory // $mf->setPassword('password'); // Mandatory if Permission is set // $mf->setPermissions(['copy']); // Optional, must be an array $files = [ __DIR__.'/input/new_pdf.pdf', __DIR__.'/input/Book1.xlsx', __DIR__.'/input/download.pdf', __DIR__.'/input/word.docx', __DIR__.'/input/Wikipedia-logo-v2.png' ]; $mf->mergeToPDF($files); } catch (Exception $e) { echo "Error: " . $e->getMessage(); }
Permission List
You can use any of the options listed below. Use [] (an empty array) if you do not want to set any permissions.
copyprintmodifyannot-formsfill-formsextractassembleprint-highres
统计信息
- 总下载量: 73
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-13