jumbaeric/docverter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jumbaeric/docverter

最新稳定版本:1.2.1

Composer 安装命令:

composer require jumbaeric/docverter

包简介

A versatile PHP package for document conversion between various formats.

README 文档

README

Docverter is a versatile PHP package for document conversion between various formats. Whether you need to convert RTF, PDF, HTML, Text, Image, Markdown, Excel, or Word documents, this package provides seamless functionality using industry-standard libraries.

Installation

You can install the package via Composer:

composer require jumbaeric/docverter

Usage

RTF to PDF Conversion

use DocVerter\RTF2PDFConverter;

$rtfContent = file_get_contents('example.rtf');
$pdfFilePath = 'output.pdf';

$converter = new RTF2PDFConverter($rtfContent, $pdfFilePath);
$converter->convert();

PDF to RTF Conversion

use DocVerter\PDF2RTFConverter;

$pdfFilePath = 'example.pdf';
$rtfFilePath = 'output.rtf';

$converter = new PDF2RTFConverter($pdfFilePath, $rtfFilePath);
$converter->convert();

HTML to PDF Conversion

use DocVerter\HTML2PDFConverter;

$htmlContent = file_get_contents('example.html');
$pdfFilePath = 'output.pdf';

$converter = new HTML2PDFConverter($htmlContent, $pdfFilePath);
$converter->convert();

PDF to HTML Conversion

use DocVerter\PDF2HTMLConverter;

$pdfFilePath = 'example.pdf';
$htmlFilePath = 'output.html';

$converter = new PDF2HTMLConverter($pdfFilePath, $htmlFilePath);
$converter->convert();

Text to PDF Conversion

use DocVerter\Text2PDFConverter;

$textContent = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
$pdfFilePath = 'output.pdf';

$converter = new Text2PDFConverter($textContent, $pdfFilePath);
$converter->convert();

PDF to Text Conversion

use DocVerter\PDF2TextConverter;

$pdfFilePath = 'example.pdf';
$textFilePath = 'output.txt';

$converter = new PDF2TextConverter($pdfFilePath, $textFilePath);
$converter->convert();

Image to PDF Conversion

use DocVerter\Image2PDFConverter;

$imagePath = 'example.jpg';
$pdfFilePath = 'output.pdf';

$converter = new Image2PDFConverter($imagePath, $pdfFilePath);
$converter->convert();

PDF to Image Conversion

use DocVerter\PDF2ImageConverter;

$pdfFilePath = 'example.pdf';
$imageFolderPath = 'output/';

$converter = new PDF2ImageConverter($pdfFilePath, $imageFolderPath);
$converter->convert();

Markdown to PDF Conversion

use DocVerter\Markdown2PDFConverter;

$markdownContent = file_get_contents('example.md');
$pdfFilePath = 'output.pdf';

$converter = new Markdown2PDFConverter($markdownContent, $pdfFilePath);
$converter->convert();

PDF to Markdown Conversion

use DocVerter\PDF2MarkdownConverter;

$pdfFilePath = 'example.pdf';
$markdownFilePath = 'output.md';

$converter = new PDF2MarkdownConverter($pdfFilePath, $markdownFilePath);
$converter->convert();

Excel to PDF Conversion

use DocVerter\Excel2PDFConverter;

$excelFilePath = 'example.xlsx';
$pdfFilePath = 'output.pdf';

$converter = new Excel2PDFConverter($excelFilePath, $pdfFilePath);
$converter->convert();

PDF to Excel Conversion

use DocVerter\PDF2ExcelConverter;

$pdfFilePath = 'example.pdf';
$excelFilePath = 'output.xlsx';

$converter = new PDF2ExcelConverter($pdfFilePath, $excelFilePath);
$converter->convert();

Word to PDF Conversion

use DocVerter\Word2PDFConverter;

$wordFilePath = 'example.docx';
$pdfFilePath = 'output.pdf';

$converter = new Word2PDFConverter($wordFilePath, $pdfFilePath);
$converter->convert();

PDF to Word Conversion

use DocVerter\PDF2WordConverter;

$pdfFilePath = 'example.pdf';
$wordFilePath = 'output.docx';

$converter = new PDF2WordConverter($pdfFilePath, $wordFilePath);
$converter->convert();

Features

  • Versatile Conversion: Convert between RTF, PDF, and HTML formats seamlessly.
  • Powered by Industry-standard Libraries: Utilizes Dompdf, PHPRtfLite, PhpSpreadsheet, PhpWord, and other libraries for reliable conversion.
  • Simple Integration: Easily integrate into your PHP projects with Composer.
  • Customizable Options: Easily customize PDF generation options as needed.

Keywords and Tags

  • Docverter
  • PHP RTF to PDF
  • Rich Text Format to PDF
  • HTML to PDF
  • PDF to HTML
  • Dompdf
  • PHPRtfLite
  • RTF Converter
  • HTML Converter
  • PDF Generation
  • PHP Package
  • Composer Package
  • Document Conversion

Credits

Dompdf - PDF generation library. PHPRtfLite - RTF generation library. PhpSpreadsheet - Excel generation library. PhpWord - Word generation library.

统计信息

  • 总下载量: 60
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-05