Skip to content

expectedbehavior/docraptor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Docrapter API

A simple client for the Docraptor API, written in PHP5.

Features

  • Convert PDF documents through the Docraptor API.

Requirements

  • PHP >= 5.3.2 with cURL extension

Installation

Using composer, add the following to composer.json:

{
	"require": {
		"bytes/docraptor": "dev-master@dev"
	}
}

Usage

<?php

use Bytes\Docraptor\Document\PdfDocument;
use Bytes\Docraptor\Http\Client as HttpClient;
use Bytes\Docraptor\Client;

$document = new PdfDocument('<Document name>');
$document->setContent($html);

$httpClient = new HttpClient();
$client = new Client($httpClient, '<4pik3y>');

try {
	$pdf = $client->convert($document);
} catch (DocraptorException $e) {

}

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%