michaeld555 / pdf-converter
A simple manager conversion for docx files to pdf
v1.0.1
2024-09-25 13:51 UTC
Requires
- php: >=8.0
- setasign/fpdi-tcpdf: ^2.3
This package is auto-updated.
Last update: 2024-12-25 16:30:12 UTC
README
Installation
Require this package in your composer.json and update composer. This will download the package.
composer require michaeld555/pdf-converter
Usage
You can create a new Converter instance and pass the docx file url and pdf file path. This will convert and save the pdf file in the path passed.
use Michaeld555\Converter; Converter::docx_to_pdf('https://example.com/file.docx', 'path_to_file/'); if (file_exists('path_to_file/file.pdf')) { echo "the file was converted successfully"; } else { echo "an error occurred during the file conversion"; }