This is an archived forum post. The information may be outdated. Contact us if you have any questions.

pdfcrowd not functionally with my page

siriuxs wrote on 2017-08-28:
Hi, I'm trying to convert this html page with this page

The code that I used is:

require 'pdfcrowd.php';

    // 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('');

    // 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
support wrote on 2017-08-29:

just influence the default layout in PDF viewer. They don't effect the size of converted PDF.
Try to use setPdfScalingFactor, e.g. set to 0.6, for shrinking your document.
Also you can try to reset margins to 0 (setPageMargins method).

Details are here: