Header and Footer height (or size)

Hi all,

Wondering if anyone has any working examples of custom header and footer sizes using frappe.utils.pdf.get_pdf Regardless of what I set for margin-top I get the same size.

Here’s a photo of what I receive.

As you can see the content up the top is cropped, there’s just not enough room to display the whole header.

I’m using the following code to print:

from frappe.utils.pdf import get_pdf
pdf_content = get_pdf(render_template('/templates/transactions/{0}'.format(TRANSACTION_NAME_MAP[doctype]['template']), obj), {
    'header-html':    ''.join([frappe.utils.get_url(), '/api/method/argo_erp.api.get_transaction_header?doctype={0}&docname={1}'.format(doctype, docname)]),  
    'header-spacing': 2,
    'orientation':    'Portrait',
    'page-size':      'Letter',
  })

Does anybody have any working examples of a larger header using wkhtmltopdf? Any help would be appreciated.

nevermind, solved it. For future reference you need to include a tag
<margin id="margin-top" hidden>{xxx}mm</margin>
at the top of your main template, not the header or footer templates. so random!