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

Set PDF Weight and Height

zohaib wrote on 2017-02-05:
Hello

I am trying to set PDF Weight and Height using pdfcrowd API.
After creating PDF when i see newly created PDF file size. that,s not which I set using following code
----------------------------------------
$client->convertHtml($html, $out_file);
$client->setPageWidth("8.5in");
$client->setPageHeight("11in");
fclose($out_file)

PDF file show page size: 8.3in * 11.70in
Html div container weight also less than 8.5in

Please held me to fix this issue.
thanks
support wrote on 2017-02-05:
Hello,

You need to call setPageWidth and setPageHeight before convertHtml.