Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Header columns alignment in PDF using CFDOCUMENTITEM

Contributor ,
Mar 22, 2011 Mar 22, 2011

Hi All,

I'm creating a PDF with CFDOCUMENT tags and using CFSAVECONTENT tags. I will do the formatting everything inside the CFSAVECONTENT Variable and create the PDF using the save content variable.

<cfdocument format="PDF" orientation="landscape">

      <cfoutput>#strContent#</cfoutput>

</cfdocument>

The generated pdf will have 5 or 6 pages which will have a table kind of structure.

My client needs the header columns on each page of the PDF. As of now, I'm having the header column in the first page alone.

I tried using CFDOCUMENTITEM TYPE="Header"; I'm seeing the columns as some text with no alignment as a row.

How to align that so that it looks as a header?

I tried the one below;

<cfdocument format="PDF" orientation="landscape">

     <cfdocumentitem type="header">
    <html>
     <tr style="font-weight: bold; font-size: 8pt; text-align:left">
              <td width="10%">Test<br>Number</td>
            <td width="11%">Test B</td>
            <td width="18%" align="Center">Test<br>Factor</td>
            <td width="18%" align="left">Test c</td>
            <td width="4%" align="left">Test Qty</td>
            <td width="4%">%<br>Impact</td>
            <td width="10%"align="center">Test Owner</td>
            <td width="6%">Date</td>
            <td width="17%" align="left">Comments</td>
        </tr>
        </html>

      <cfoutput>#strContent#</cfoutput>

</cfdocument>

Thanks in advance for your help!

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 29, 2011 Mar 29, 2011
LATEST

Got this header formatting working by using CFSAVECONTENT before the CFDOCUMENT tag.

Not sure why my style sheets not working inside the CFDOCUMENT tag.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources