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

Header showing smaller

gbweb wrote on 2012-04-06:
This script pulls the same exact URL, I just have the height sized down so that it will only show the header. Any reason as to why the header would show at a different size?
support wrote on 2012-04-06:
The URL you posted does not work for me, it returns
Notice: Undefined index: HTTP_REFERER in /gbdev/pnc_pp/htdocs/PDF.php on line 2
gbweb wrote on 2012-04-06:

Click the PDF Icon there to access the URL
gbweb wrote on 2012-04-06:
Also sometimes it generates a PDF, sometimes we get this error:

Fatal error: Uncaught exception 'PdfcrowdException' with message 'Can't load the specified URL.' in /gbdev/pnc_pp/htdocs/pdfcrowd.php:335 Stack trace: #0 /gbdev/pnc_pp/htdocs/pdfcrowd.php(103): PdfCrowd->http_post('http://pdfcrowd...', 'username=gbweb&...', NULL) #1 /gbdev/pnc_pp/htdocs/PDF.php(24): PdfCrowd->convertURI('http://pp.gbdev...') #2 {main} thrown in /gbdev/pnc_pp/htdocs/pdfcrowd.php on line 335
support wrote on 2012-04-08:
Ok, please could you post here your API integration code you use for this page?
gbweb wrote on 2012-04-09:
$filename = urldecode($_GET['filename']);
$client = new Pdfcrowd("xxx", "xxxxx");
$client->setFooterHtml("<p align='right'>%p of %n</p>");
$pdf = $client->convertURI("$url&PDF");

@header("Content-Type: application/pdf");
@header("Cache-Control: no-cache");
@header("Accept-Ranges: none");
@header("Content-Disposition: attachment; filename=\"".$filename.".pdf\"");

echo $pdf;
support wrote on 2012-04-09:
The header page contains div#siteCenter whose width is set to 926px which is 9.56'

The width of the PDF printable area is 8.3' - 2*0.75 = 6.8' so the header page is scaled down to ~71% to fit the PDF page. That's why the header comes out smaller.

To fix this, you need to make the header page width smaller or equal than the PDF printable area width. Even better would be to use an HTML fragment containing only the header code instead of the whole web page.

Regarding the timeout error, we will take a closer look at it and update you once we know the cause.