|Ratings|| ||Unique User Downloads|| ||Download Rankings|
| 75%||Total: 3,869 This week: 2||All time: 822 This week: 49|
This class can convert HTML to PDF using pdflayer API.
It can send HTTP requests to the pdflayer API Web server to convert a given HTML document to PDF. The HTML may be passed literally or as the URL of a given page to convert.
The class retrieves the converted HTML document and displays the PDF document as the current request output or serve it for download.
The class can pass conversion options like:
- Standard and custom page sizes and orientation
- Viewport page sizing and zooming
- Customized page headers and footers
- Stamps and watermarks
- Owner and user password protection
- PDF file permissions to save, print, etc..
- PDF Meta data
|PDF is a format often used to generate documents that were meant to be printed in paper.
Many Web applications need to generate PDF to address their users printing needs. However, what most Web applications do is to generate HTML.
This class can minimize the development effort by allowing to convert HTML generated by Web applications to PDF documents using a Web service.
It provides some unique features that help developers to customize better their application needs like setting page headers, footers and margins, adjusting the printed document viewport size and zoom level, add stamps and watermarks to the PDF document, encrypt the document, as well add owner and user passwords to it.
Basic instantiation and usage
$h2pdf = new html2pdf();
//set the url to convert
//start the conversion
//display the pdf file
Version: 1.0 2/8/2016
Copyright 2016 Wagon Trader, All Rights Reserved
Convert HTML to PDF using the pdfLayer API from
html2pdf.class.php - main class
reference.txt - parameter reference
/example - usage examples
Upload files to a web accessible location on your server (eg. public_html)
You can change the following settings in the class to meet your specific needs...
apiKey = Your personal API Key, get a free key at https://pdflayer.com/product
endpoint = The API endpoint, you will only need to change this if the API
secretKey = If you have defined and activated the secret keyword feature from you
pdfLayer dashboard, add your secret keyword here.
refer to examples in example for class instantiation and usage.
refer to html2pdf.class.php for instructions on using methods.
refer to reference.txt file for available parameters and their usage.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.