How to display bookmark in a PDF document in ColdFusion

CFdocument - Show bookmark in PDF document

cfdocumentBookmark.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfdocument tag: how to use and show bookmark in pdf document in coldfusion</title>
</head>

<body>

<cfquery name="qCenters" datasource="cfdocexamples" maxrows="11">
 SELECT Center_ID, Name, City FROM CENTERS
</cfquery>

<cfquery name="qParks" datasource="cfdocexamples" maxrows="11">
 SELECT ParkName, City FROM Parks
</cfquery>

<cfdocument format="pdf" bookmark="true">
 <cfoutput>
        <cfdocumentitem type="header">
            Current Page Number: #cfdocument.currentpagenumber#
        </cfdocumentitem>

        <cfdocumentsection name="Center Details">
            <h4 style="color:DarkCyan; font-style:italic">
                Center Details
            </h4>
            <cftable query="qCenters" colheaders="yes" htmltable="no" border="no">
                <cfcol header="Center ID" text="#Center_ID#">
                <cfcol header="Center Name" text="#Name#">
                <cfcol header="City" text="#City#">
            </cftable>
        </cfdocumentsection>

        <cfdocumentsection name="Park Details">
            <h4 style="color:DarkCyan; font-style:italic">
                Park Details
            </h4>
            <cftable query="qParks" colheaders="yes" htmltable="no" border="no">
                <cfcol header="Park Name" text="#ParkName#">
                <cfcol header="City" text="#City#">
            </cftable>
        </cfdocumentsection>
 </cfoutput>
</cfdocument>

</body>
</html>









More ColdFusion examples