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

Font size changing, causing more PDF pages than expected

yahavbr wrote on 2019-12-18:

I'm using the node.js HTML to PDF API and it's working fine.

I conver HTML to PDF, A4 format, and having pages of my data. So far so good.

In my HTML, I do not specify default font size, but was expecting the same default font size to be used, which is not the case.

Sometimes the font is normal, then I get e.g. 10 pages, but sometimes, with different content, the font gets bigger and I get more pages than expected.

Is there a way to force default font size without using CSS? (i.e. in API level)

support wrote on 2020-01-23:
Hello Yahav,

We use smart scaling to fit more content into the page. So the output font size may differ.
To disable this feature use API method setSmartScalingMode('disabled'). See details.

If the problem persists, please contact us on
yahavbr wrote on 2020-01-23:
Thanks a bunch. Didn't know of that option.