PHP File Converters provides a unified interface to various tools that PHP developers use on a regular basis for file conversions.

Engines Currently Supported

  1. Convert Engines
    1. AbiWord
    2. Catdoc
    3. Docverter
    4. GhostScript
    5. Htmldoc
    6. ImageMagick
    7. LibreOffice
    8. Pandoc
    9. PhantomJs
    10. Ted
    11. Unoconv
    12. Unrtf
    13. WkHtmlToPdf
    14. Xhtml2Pdf
  2. Optimize Engines
    1. JpegOptim
    2. Pdftk
  3. ReplaceString
    1. Native (custom for PFC!)
  4. ... and more are coming soon ...

Getting Started

Fork me on GitHub

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>
Technologies:


blog comments powered by Disqus