I am using Python pdfkit to generate pdf files from HTML templates.
All works fine except for the fact that I can't figure a way to add the bottom and top padding beyond the first page.
That means I end up with a pdf file as such:
Another example:
I can't afford to add the margins through the Python code as it will affect the background of the files.
What are my options here to add some padding on each page header and footer without using margin as:
options = {
'page-size': 'A4',
'margin-top': '0in',
'margin-right': '0in',
'margin-bottom': '0in',
'margin-left': '0in',
'encoding': "UTF-8",
'no-outline': None,
'dpi': 150,
"disable-smart-shrinking": True
}
pdfkit.from_string(_html, temp_path, options=options,)