Created
July 18, 2018 21:45
-
-
Save apexdodge/849bf9f536704605f05700f9a7874423 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('../_lib/libraries/sys/api2pdf/api2pdf.php'); //link this to your external library, whatever your file is named. | |
$apikey = "YOUR-API-KEY"; | |
$payload = array("html"=>"<p>Hello World</p>", "inlinePdf"=> true, "fileName"=> "test.pdf"); | |
$res = wkhtmltopdf_to_pdf($apikey, $payload); | |
header("Location: ".$res->pdf); //this redirects to the PDF. Remove this if you don't want to do that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment