<?php include_once "inc/phpToPDF.php"; $url = "http://bumblebeewireless.com/sell-it/invoice.php?trade_id=" . $_GET['invoice']; phptopdf_url($url, "pdf-boxes/", $_GET['invoice'] . ".pdf"); $filetoopen = "pdf-boxes/" . $_GET['invoice'] . ".pdf"; header("Content-disposition: attachment; filename={$filetoopen}"); header('Content-Type: application/octet-stream'); readfile($filetoopen);
<?php // INCLUDE THE phpToPDF.php FILE require "phpToPDF.php"; // GENERATE PDF FILE FROM SPECIFIED URL, SAVES TO CURRENT DIRECTORY ('/') phptopdf_url('http://google.com/', '', 'legacy_url_example.pdf'); // OPTIONAL - PUT A LINK TO DOWNLOAD THE PDF YOU JUST CREATED echo "<a href='legacy_url_example.pdf'>Download Your PDF</a>"; ?>
<?php include_once ('phpToPDF.php'); // Code to generate PDF file from specified URL phptopdf_url ( 'https://google.com/', 'pdf/', 'my_pdf_filename.pdf' ); echo "<a href='pdf/my_pdf_filename.pdf'>Download PDF</a>"; ?>