2017 © Pedro Peláez
 

library wkhtmltopdf-api

image

amonger/wkhtmltopdf-api

  • Tuesday, June 13, 2017
  • by haveacigaro
  • Repository
  • 1 Watchers
  • 2 Stars
  • 278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

wkhtmltopdf docker

This is a docker micro-service which has a simple api to generate PDFs., (*1)

To set up the server

docker build -t wkhtmltopdf .
docker run -d -p 80:80 -v $(pwd)/api:/var/www/html wkhtmltopdf

To put in a PHP project

You'll need to set an Authorization header. This is defined in the .env file in the server code., (*2)

require_once "vendor/autoload.php";

use GuzzleHttp\Client;
use PDFGenerator\PDFGenerator;
use PDFGenerator\Implementation\RemotePDF;

$client = new Client([
  'base_uri' => 'http://192.168.0.1:8080',
  'headers'  => ['auth' => '123456789']
]);
$generator = new PDFGenerator(new RemotePDF($client));

header("Content-type:application/pdf");

echo $generator->fromURL('http://www.google.co.uk');

The Versions

13/06 2017

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Alan Monger

13/06 2017

v1.3.2

1.3.2.0

  Sources   Download

The Requires

 

by Alan Monger

13/06 2017

v1.3.1

1.3.1.0

  Sources   Download

The Requires

 

by Alan Monger

16/02 2016

v1.3.0

1.3.0.0

  Sources   Download

The Requires

 

by Alan Monger

16/02 2016

v1.2.0

1.2.0.0

  Sources   Download

The Requires

 

by Alan Monger

21/01 2016

v1.1.0

1.1.0.0

  Sources   Download

The Requires

 

by Alan Monger

20/01 2016

v1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by Alan Monger

20/01 2016

v1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Alan Monger

20/01 2016

v1.0.0

1.0.0.0

  Sources   Download

The Requires

 

by Alan Monger