Welcome! Log In Create A New Profile

Advanced

Forcing Portrait

Posted by spyke01 
Forcing Portrait
October 17, 2010 11:14PM
Guys,
I am trying to force a page to show in portrait instead of landscape however it doesn't appear to be working. Heres the code I am using:

$client = new Pdfcrowd('*USERNAME*', '*API_KEY*');
$client->setPageWidth('8.5in');
$client->setPageHeight('11in');
try {
    header('Content-type: application/pdf');
    //header('Content-Disposition: attachment; filename="test.pdf"');
    echo $client->convertHtml($reportData);
}
catch(PdfcrowdException $e) {
    echo $e->getMessage();
}

What am I doing wrong?
Re: Forcing Portrait
October 18, 2010 01:22AM
Your code should produce portrait -- we run your code and it works as expected.

Are you sure you are not getting a cached pdf?
Re: Forcing Portrait
October 18, 2010 07:53AM
I apologize, it looks like that was the case, thank you for your help.
Sorry, only registered users may post in this forum.

Click here to login