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

[Python Library] setPageLayout -- cannot find "One Long Page" like in web app

catalogs@netretailers.net wrote on 2017-03-01:
Greetings,

I am using the Python API and I cannot figure out how to get the page to be a single continuous page like when the checkbox on site is checked (http://i.imgur.com/C6NHVUQ.png)

I've tried setting: client.setPageLayout(1), client.setPageLayout(2), client.setPageLayout(3)

I believe 1 should be the correct setting for ths, but it doesnt appear to work.
support wrote on 2017-03-02:
Hello,

The following should do the trick:
client.setPageLayout(-1)
catalogs@netretailers.net wrote on 2017-03-03:
Greetings,

With client.setPageLayout(-1)

I get this
File "C:\Users\XXXXXXXXX\pdfcrowd.py", line 180, in setPageLayout
assert value > 0 and value <= 3
AssertionError

Process finished with exit code 1
--

It looks like only options are 1, 2, 3 -- and none appear to match output of site with single continuous page.
support wrote on 2017-03-06:
Hello,

Oops, it should have been:
client.setPageHeight(-1)

Sorry for the confusion.
catalogs@netretailers.net wrote on 2017-03-10:
This 'appears' to work, as it is now 1 page, but there is no longer any content on the page - it's all white :(
http://i.imgur.com/yu3AaRU.png
support wrote on 2017-03-14:
Hello,

Unfortunately, the "single page" feature does not work reliably in some cases depending on the actual HTML code being converted.