Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

You can use marginTop = "number" in cfdocument.

<cfdocument
format = "PDF|FlashPaper"
authPassword = "authentication password"
authUser = "authentication user name"
backgroundVisible = "yes|no"
bookmark = "yes|no"
encryption = "128-bit|40-bit|none"
filename = "filename"
fontEmbed = "yes|no"
localUrl = "yes|no"
marginBottom = "number"
marginLeft = "number"
marginRight = "number"
marginTop = "number"
....
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top