Hi,
I'm trying to format a PDF generated from a URL via the API. The API is called form a PHP script (below). At first it generated the PDF fine, but with no margins (horiz or vert), so I added the page height, width to A4 dimentions, and margins to 1 inch.
Now the PDFs it creates have the margins, but has scaled down the pages so they appear as a long thin column.
Here's a link to a generated PDF.
Can anyone help with what's wrong?
Thanks
Jason
require 'pdfcrowd.php';
function savePDF($site_url)
{
try
{
$client = new Pdfcrowd("j************d", "c*****************************0");
$siteFilename="saved-reports/" . $site_url . ".pdf";
$client->setPageHeight("297mm");
$client->setPageWidth("210mm");
$client->setHorizontalMargin("1in");
$client->setVerticalMargin("1in");
$client->setFooterText("Get Me In Google!");
// $client->setAuthor("Jason Rudland");
$client->convertURI(curPageURL(), fopen($siteFilename, 'wb'));
// echo "remaining tokens: " . $client->numTokens();
}
catch(PdfcrowdException $e)
{
echo $e->getMessage();
}
}