有谁知道我如何设置由<cfdocumentitem format="pdf:...
生成的pdf中标题的高度?
我正在使用<cfdocumentitem type="header">
所以有像
这样的东西<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>
提前感谢任何指示。
杰森
答案 0 :(得分:3)
使用 cfdocument 标记中的边距设置来控制为页眉或页脚保留多少空间。
因此,在您的情况下,将margintop值从4更改为较低的值。
<cfdocument format="pdf" marginbottom="0" margintop="4" marginleft="0" marginright="0" pagetype="a4" unit="cm" fontembed="no">
要进一步控制标题的外观,例如填充,行高,您需要在标题内容中添加HTML和CSS样式。
答案 1 :(得分:1)
您可以在cfdocument中使用marginTop =“number”。
<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"
....