PHP code example of wslibs / htmltopdf
1. Go to this page and download the library: Download wslibs/htmltopdf library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wslibs / htmltopdf example snippets
HtmlToPdf::setSign('您的项目唯一码');
/**
* url 必须 要生成pdf的html链接地址
* type 可选[base64,url] 返回格式 默认为base64格式
*/
HtmlToPdf::syncCreatePdf("https://www.baidu.com/",8002,'url');