This is an archived forum post. The information may be outdated. Contact us if you have any
Error with setPdfScalingFactor function
wrote on 2011-12-08:
Hello! I'm a newbie with pdfcrowd. I have a premium account, and I try to use your API with this file, but when I call setPdfScalingFactor(1.3), width = 8.5in and height = 11in, the content doesn't scale. Can u explain it, thanks for advance!
wrote on 2011-12-09:
if the width of an html document is greater than the pdf page width the html contents is scaled down to fit the pdf page width. In such case the setPdfScalingFactor(n) method has no effect for n>1.0.
The width of your web page is set to 816px but there are several elements in the page that go over the right margin and which extend the width.
For instance img#sketch-8014. It is a 771x132 uncropped image which extends the html page width to 1321 pixels. That's why setPdfScalingFactor() does not work you and why your web page is shrunk in the generated pdf.