Hello everyone
I'm working on a simple python script which should be able to download a html page to a pdf file. For this I'm using the PDFKit module.
Everytime I do an export I get troubles with the line endings in the text of the right site. The text is cutted and the letters are not fully printed a.k.a. no more readable as full words.
I tested some different options with margins width etc. but everytime I get the page the letters are cutted.
Does anyone have the same troubles or a quick fix for that?
Thank you!
I'm working on a simple python script which should be able to download a html page to a pdf file. For this I'm using the PDFKit module.
Everytime I do an export I get troubles with the line endings in the text of the right site. The text is cutted and the letters are not fully printed a.k.a. no more readable as full words.
I tested some different options with margins width etc. but everytime I get the page the letters are cutted.
Code
import pdfkit
options = {
'page-size': 'A4',
'margin-top': '10mm',
'margin-right': '10mm',
'margin-left': '10mm',
'margin-bottom': '10mm',
'encoding': "UTF-8",
}
url = "enter here a random medium platform link" # example page
pdfkit.from_url(url, 'out.pdf', options=options)Does anyone have the same troubles or a quick fix for that?
Thank you!

