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

setPdfScalingFactor not working

fuzzpedal wrote on 2013-07-29:
I currently have the following code:


The page width and height are being set correctly, but the scaling is having no effect on the resulting PDF.
I have tried various factors but none have had any effect.

My aim is to get the content to fill the page in the PDF.

Please can you confirm that this feature of the API is working correctly, or let me know if I'm doing something wrong here.

support wrote on 2013-07-30:

Your code looks perfectly fine. If you can send us the HTML content we will look at why it does not work.
fuzzpedal wrote on 2013-07-31:
Here is the HTML content as requested.
support wrote on 2013-08-02:

I tested the HTML content and it works fine with setPdfScalingFactor() for me. Could you post your full API integration code so I can check to see if there isn't some other problem?
fuzzpedal wrote on 2013-08-05:
I've narrowed it down to some simple css.

If I set width: 960px; on #page, it prevents any scaling.
Is this a known limitation of setPdfScalingFactor?

I've attached the updated content.html

support wrote on 2013-08-07:

If an HTML document specifies a fixed width which is greater than the PDF page width, then the HTML contents is scaled down to fit the PDF page width and setPdfScalingFactor is ignored.