I transformed an HTML file into a pdf simply by:
pdfkit.from_file("cpp.html",'cpp.pdf')
Problem is that the font-size is very small.
How to increase the font-size (both of headers and paragraphs) using pdfkit? Obviously I want the headers font to remain bigger than the paragraphs font.
I guess I have to tweak the options, but I can't find how.
In my case manually setting dpi helped.
options = {
'dpi':96,
}
pdfkit.from_url(url,out_file,options=options)
There's also a zoom option, which solved the problem for me. (Takes a Float)
options = {
'zoom': 2,
}
pdfkit.from_url(url,out_file,options=options)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With