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

Alignment issue

mikhan wrote on 2014-06-19:
hi there,
I just created an API account for testing if I can create proper pdf using the API. Before creation I try your online free service to see how it works and it works perfectly fine. but when I try to use the API for creating same pdf file. it didnt work exactly. I am attaching both online created and API created files to show you the difference. The difference I noticed is with online creation it create pdf perfectly in a single pdf page; while when I use API code for generating the pdf it creates the file fine but there is a lot of empty space below the actual file in the page(see the API_generated.pdf attached). I have used default setting. and the html code I use is also attached: (I use RAW html for both versions).

Thanks in Advance
M Irfan Khan
support wrote on 2014-06-20:

This is because the online conversion form on our web site prints to Landscape whereas the API prints to Portrait. You can use the following code to print to Landscape from the API:

(This is a PHP code. If you use another programming language, just change the call syntax accordingly).
mikhan wrote on 2014-06-20:
It works like a charm.