pdfcoldfusioncfdocument

How to set the height of a PDF header?


Does anyone know how I can set the height of a header in a pdf generated by <cfdocumentitem format="pdf:...?

I am using <cfdocumentitem type="header">

So have something like

<cfdocument format="pdf" marginbottom="0" margintop="4" marginleft="0" marginright="0" pagetype="a4" unit="cm" fontembed="no">
<cfdocumentitem type="header">
  This is my header.. I want to reduce the height but can't work out how.
<cfdocumentitem>
</cfdocument>

Thanks in advance for any pointers.

Jason


Solution

  • Use the margin settings in the cfdocument tag to control how much space is reserved for headers or footers.

    So in your case, change the margintop value from 4 to a lower value.

    <cfdocument format="pdf" marginbottom="0" margintop="4" marginleft="0" marginright="0" pagetype="a4" unit="cm" fontembed="no">
    

    To further control the appearance of your header, such as padding, line-height, you would need to add HTML and CSS styles to your header content.