dev-master
9999999-dev https://github.com/knyga/convertapi-phpPHP library for the convertapi.com REST API.
GNU
The Requires
- php >= 5.4
- lib-curl *
by Oleksandr Knyga
by ConfuzzledDuck
curl knyga convertapi confuzzledduck
PHP library for the convertapi.com REST API.
PHP library for the convertapi.com REST API., (*1)
ConvertApi is an online file conversion service for creating PDF and Images from various source files, such as Word documents, web pages and raw HTML. converapi-php provides a set of classes for using the ConvertApi service with PHP., (*2)
Development of this library is not in any way connected with Baltsoft Software., (*3)
Install Composer to your project root:, (*4)
curl -sS https://getcomposer.org/installer | php
Add a composer.json
file to your project:, (*5)
{ "require": { "knyga/convertapi-php": "dev-master" } }
Run the Composer installer:, (*6)
php composer.phar install
Using the library is simple:, (*7)
The conversion will write the converted document to the given filesystem path and return verious details about the conversion (depending on the response from ConvertApi), or return a binary string representation of the document., (*8)
See example/example.php for a working example., (*9)
The library currently supports all the conversions available via convertapi.com., (*10)
Addition of new conversions is simply a matter of extending the abstract ConvertAPI class and, (*11)
a) defining: * $_apiUrl - the URL of the ConvertApi endpoint (see http://www.convertapi.com/ for details) * $_validInputFormats - an array of document types (extensions) which can be converted, (*12)
b) completing function __set() to handle additional valid parameters for the conversion being defined., (*13)
PHP library for the convertapi.com REST API.
GNU
curl knyga convertapi confuzzledduck