2017 © Pedro Peláez
 

library html2pdf

calls aws-lambda through aws-gateway-api to create pdf from html

image

thomascmobley/html2pdf

calls aws-lambda through aws-gateway-api to create pdf from html

  • Thursday, December 29, 2016
  • by ThomasCMobley
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

This package sends a curl containing various data to AWS API Gateway which passes it on to an AWS Lambda function to transform a html (raw or url) to pdf and store it to the indicated s3 bucket/filepath/filename., (*1)

Use: $html2pdf = new ThomasCMobley_Html2Pdf(); $parameters = [ 'apiurl'=>'https://yofd0pxi8l.execute-api.us-west-2.amazonaws.com/html2pdf/lambdapdf', 'apikey'=>'47YexK2GHWapTiVm2aSGyalRylF5pvAkads7fgSJ', 'data'=>$data, 'bucket'=>'tclassifieds', 'fontlinks'=>['https://fonts.googleapis.com/css?family=Lora'], 'domain'=>'http://vstage.thomascmobley.com', 'options'=>['footerCenter'=>'Page [page] of [toPage]'] ]; $return = $html2pdf->transform($parameters);, (*2)

apiurl, apikey and data are required. data may be a URI (including the http(s)://) or raw html fontlinks is a link to a cdn containing the desired fonts. Fonts may also be loaded into the Fonts folder. domain contains the actual domain raw html needs for loading stylesheets/js/images. options is an array of any of the listed options contained in the head of the class, (*3)

Return: On success it returns an array containing bucket, filename and filepath.
On failure it returns an array containing error information., (*4)

The Versions

29/12 2016

dev-master

9999999-dev

calls aws-lambda through aws-gateway-api to create pdf from html

  Sources   Download

by Thomas C Mobley