Skip to content

Instantly share code, notes, and snippets.

Jonathan Montgomery jjmontgo

View GitHub Profile
@jjmontgo
jjmontgo / GeneratePDF.php
Created Oct 31, 2018
A PHP Class to fetch a PDF URL from the PDF Service
View GeneratePDF.php
<?php
/**
* Makes a POST request to a Lambda function through an API Gateway
* which encapsulates a call to wkhtmltopdf, rendering an HTML
* document as a PDF file and returning a signed URL to the
* file in an S3 bucket.
*
* The POST can contain the following parameters:
* body - A complete HTML5 document to be rendered in PDF (required)
* header - A complete HTML5 document to be rendered in the header of every page (optional)
You can’t perform that action at this time.