Nel tutorial di oggi imparerete come convertire una pagina web o un contenuto HTML in PDF. Per fare quanto detto utilizzeremo le api Pdfcrowd che supportano completamente HTML/CSS2.
Qui potete trovare la documentazione: http://pdfcrowd.com/html-to-pdf-api/
// convert a web page require 'pdfcrowd.php' $client = new Pdfcrowd("your-username", "your-apikey"); $client->convertURI('http://www.example.com/', fopen('example.pdf', 'wb')) // convert an HTML string $html = "<html><body>In-memory html.</body></html>"; $client->convertHtml($html, fopen('html.pdf', 'wb')); // convert an HTML file $client->convertFile('/path/to/local/file', fopen('file.pdf', 'wb'));



Leave Your Response