Hi, I'm trying to convert this html page https://www.magazzinoperfetto.it/test/fattura/green.html with this page https://www.magazzinoperfetto.it/test/index.php
The code that I used is:
<?php
require 'pdfcrowd.php';
try
{
// create an API client instance
$client = new Pdfcrowd("siriuxs", "56f244f7408025bcecf03192f718da3f");
// convert a web page and store the generated PDF into a $pdf variable
$pdf = $client->convertURI('https://www.magazzinoperfetto.it/test/fattura/green.html');
$client->setPageWidth("210mm");
$client->setPageHeight("297mm");
$client->setInitialPdfZoomType(Pdfcrowd::FIT_PAGE);
$client->setPageLayout(Pdfcrowd::CONTINUOUS);
// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: max-age=0");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"google_com.pdf\"");
// send the generated PDF
echo $pdf;
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}
?>
As you can see, the result isn't not what I see in the html page. Why? I want the incoice in a single pdf page