8

I'm using pdfkit Python libraries to convert an html page to pdf.

All I'm doing is using the command:

pdfkit.from_file('mypage.html', 'output.pdf')

The problem is that I obtain a multiple-page pdf, whereas I'd like to have everything on one page. How can I force pdfkit to shrink/scale the web page to fit on a regular A4 page? The webpage is locally saved on my PC, so I could also act on the html, if needed. Is there a way to "rescale" a web page at once?

Thank you!

fatoddsun
  • 251
  • 1
  • 12
  • 1
    It's a shame this hasn't been answered. As an alternative, I'd like page size to be scaled to fit into 1 page (rather than shrinking content). – user1318135 Aug 02 '16 at 16:01

0 Answers0