ifocwny
wrote on 2019-02-06:
When creating PDFs using the v1 api, some of the footers are being rendered below the printable area on the pages. I haven't got a clue as to why they are rendering that way. Any ideas?
support
wrote on 2019-02-06:
Try to use define some bottom page margin by:
setPageMargins
ifocwny
wrote on 2019-02-06:
The margins were already specified and coded in. After adding them in using setPageMargins(0.1,0.1,0.1,0.1) I get the same results. I've attached a copy of where the footer is output to and the HTML for the footer.
support
wrote on 2019-02-07:
Doesn't your HTML body have some margins?
Please try the following working example.
client = pdfcrowd.Client("your-username", "your-api-key")
output_file = open('/tmp/html.pdf', 'wb')
html="<head></head><body style='background-color: red'>My HTML Layout</body>"
client.setPageMargins("0.1in","0.1in","0.1in","0.1in")
client.setFooterHtml('<div style="background-color: blue; font-size: 8pt; font-weight: bold; float: left">HO/MH App</div>')
client.convertHtml(html, output_file)
output_file.close()
If the problem persists still, please sen your main HTML, footer HTML and source code used to support@pdfcrowd.com
ifocwny
wrote on 2019-02-07:
Oddly enough I found that by specifying the page size finally came back.
I don't know why though as the original age size was A4 and when I changed to letter dimensions the result was the footer reappearing where it was supposed to be. In the end, the page size and page margins are defined among with the header and footer html. Page size was not there in the beginning.