betrisey/pdf-client

There is no license information available for the latest version (1.1.0) of this package.

PHP client for Axianet's PDF converter service

1.1.0 2016-01-08 15:30 UTC

This package is not auto-updated.

Last update: 2024-11-05 19:30:17 UTC


README

PHP client for Axianet's HTMLtoPDF service

Installation

composer require betrisey/pdf-client

Usage

<?php
require_once 'vendor/autoload.php';
use Axianet\pdfConverter\pdfClient;

$pdf = new pdfClient([
	'url' => 'http://localhost/htmltopdf/',
	'authUrl' => 'http://localhost/htmltopdf/auth/token.php',
	'clientId' => '        ',
	'clientSecret' => '        '
]);

$pdf->fromFile('file.html');
$pdf->fromString('<h1>Content</h1>');
$pdf->fromUrl('google.com');

Send email

$pdf->fromFile('file.html', 'samuel@axianet.ch', 'Suject', 'Content');
$pdf->fromFile('file.html', ['samuel@axianet.ch', 'info@axianet.ch'], 'Suject', 'Content');