michaeld555/pdf-converter

简单的docx文件转换为pdf的转换管理器

v1.0.1 2024-09-25 13:51 UTC

This package is auto-updated.

Last update: 2024-09-25 15:49:11 UTC


README

安装

在您的composer.json中添加此包,并更新composer。这将下载此包。

composer require michaeld555/pdf-converter

使用方法

您可以创建一个新的Converter实例,传入docx文件的URL和pdf文件的路径。这将在此路径中转换并保存pdf文件。

    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";

    }