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

part of the page is returned

merijn wrote on 2011-11-15:
Hi,

First of all I have to say, what an awesome tool this is! It could really save me hundreds of hours of building a pdf conversion tool for my project.
The problem I ran into was that in about half of the requests that I send the PDF that was returned by the webservice only displays the top half of the page (or more, varying from 50 to 90% of the page, but not the complete page). I attached an example of such a page (325.pdf). The complete page can be found on http://www.kwaliteit-post.nl/restricted/print_route.php?id=325. I tried to convert the same page twice, and the page gets cut off at the exact same point. Does anyone have an idea what I am doing wrong?

Another thing is that I notice that the yellow polygons on the map get a dark yellow line through it on the PDF which is not on the HTML version of the page. This is not a huge problem, but if someone knows how to get rid of it, would be nice.

By the way, the settings I use (to get a landscape oriented PDF) are:

$client->setPageWidth('280mm');
$client->setPageHeight(-1);
$client->setHorizontalMargin('1mm');
$client->setVerticalMargin('8mm');
$client->setMaxPages(1);

Thanks,

Merijn
support wrote on 2011-11-15:
Hi,

the problem is caused by setting the page height to -1. Use the following to print to A4 landscape:
$client->setPageWidth('280mm'); 
$client->setPageHeight('216mm');


The dark yellow border is visible when you open your page in Google Chrome - that's why it is printed to PDF.