cfdocument type=pdf with multiple pages but single header

652 views
Skip to first unread message

Troy Murray

unread,
Jan 26, 2012, 3:58:54 PM1/26/12
to ra...@googlegroups.com
I'm using cfdocument to push a PDF file to the users browser.  Sometimes these PDF reports run over to a second page.  Anyone have a tip or suggestion on how to have the same header on both pages and or determine how to put a page number on the reports?

--
Troy Murray

Jean Moniatte

unread,
Jan 26, 2012, 4:48:41 PM1/26/12
to ra...@googlegroups.com
Hello,

Did you give cfdocumentitem (http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7758.html) a try? It is supposed to be made for that.

Thanks,
Jean

--
Jean Moniatte
UGAL
je...@ugal.com
www.ugal.com
--

Mike Johnson

unread,
Jan 26, 2012, 4:58:38 PM1/26/12
to ra...@googlegroups.com

That's what I use all the time and it works for me

 

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

                <table width="800">

                                <cfdocumentitem    type = "header">

            <tr>

                <th>Header on each page</th>

            </tr>

        </cfdocumentitem> 

          <tr>

                <td>Body of pdf </td>

          </tr>

         <cfdocumentitem type="footer">

                                                <cfoutput>Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput>

                                </cfdocumentitem>

               </table>

</cfdocument>

Reply all
Reply to author
Forward
0 new messages