PHP File Converters provides a unified interface to various tools that PHP developers use on a regular basis for file conversions.
Engines Currently Supported
-
Convert Engines
-
AbiWord
-
Catdoc
-
Docverter
-
GhostScript
-
Htmldoc
-
ImageMagick
-
LibreOffice
-
Pandoc
-
PhantomJs
-
Ted
-
Unoconv
-
Unrtf
-
WkHtmlToPdf
-
Xhtml2Pdf
-
-
Optimize Engines
- JpegOptim
- Pdftk
-
ReplaceString
- Native (custom for PFC!)
- ... and more are coming soon ...
Getting Started
Installation
Option 1: Add the "wittiws/php-file-converters" requirement to your composer.json configuration.
Option 2: From the command-line, execute: composer create-project wittiws/php-file-converters
Option 3: Download the source code from Github and then run `composer update`.
CLI: Command Line Example
<path>/bin/fileconverter <source> <dest>
PHP Example with Composer Autoload
<?php $fc = \Witti\FileConverter\FileConverter::factory(); $fc->convertFile($source, $destination);
CLI: STDIN/STDOUT
Use a hyphen to indicate STDIN (for input) or STDOUT (for output).
prompt> echo "## hi ##" | fileconverter - - --conversion=md:html <h2 id="hi">hi</h2>