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

Different output

chichi.filweb wrote on 2013-06-07:
I'm using the api for php.

Why is it that the output pdf from the api for php and the one from your homepage "Convert web page" are different.
The one from your homepage outputs a better pdf file than with the api for php.
support wrote on 2013-06-10:

Add the following lines to your code to make the output PDF from the API and from the homepage the same:

Use this to setup the page in Landscape mode:
koya wrote on 2013-06-11:

I am also facing the same problem.

I am having 3 html pages.

After using API I am getting only 2 pages as output for pdf.

That is looking very unprofessional.

I need to get 3 pages as output for pdf.

If I need to get three pages as output like you said, where I need to use this code?

For which method i need to set these lines?
support wrote on 2013-06-12:

Add the lines above to your application before calling convertURI(), convertHtml(), or convertFile().

Note that this is PHP code. If you use another programming language to call the Pdfcrowd API, simply change the code syntax - the method names are the same.
koya wrote on 2013-06-13:

I tried it. It works upto some extent. But getting perfection output.

Actually what I am doing is,

1 . I am having a php file to enter input. After filling the input data, once after submit "send" button, it will goto output page where the entered input data will be printed in this file.

2 . And meanwhile when entering into the output page, output buffer will starts and it will automatically creates a .html file by using buffer concept for second file.

3 . We are using to convert this created html file to pdf using API.

4 . Everything is fine. But the output file is not looking good.

5 . I need to get the output for pdf as same as the generated .html file.

6 . But now its not coming like that. I tried alot of alternatives for this. Nothing workout
support wrote on 2013-06-14:

If you can post your HTML file and pinpoint what exactly is not looking good, we can take a look at what can be done about it.