betrisey/pdf-client

此包的最新版本(1.1.0)没有可用的许可证信息。

用于Axianet PDF转换服务的PHP客户端

1.1.0 2016-01-08 15:30 UTC

This package is not auto-updated.

Last update: 2024-09-24 18:58:49 UTC


README

用于Axianet HTMLtoPDF服务的PHP客户端

安装

composer require betrisey/pdf-client

使用方法

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

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

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

发送电子邮件

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