Skip to main content

Posts

Showing posts with the label cfdocument

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 Detai...

How to show footer in a printable PDF document in ColdFusion

CFdocument - Show footer in printable document cfdocumentFooter.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 show footer in printable document as cfdocumentitem type footer</title> </head> <body> <cfquery name="qCenters" datasource="cfdocexamples" maxrows="11"> SELECT Center_ID, Name, City FROM CENTERS </cfquery> <cfdocument format="pdf"> <cfoutput> <cfdocumentitem type="footer"> Page Footer <br />Current Page Number: #cfdocument.currentpagenumber# </cfdocumentitem> <cfdocumentsection> <h4 style="color:DarkCyan; font-style:italic"> cfdocument example: display document footer </h4> ...

How to display web pages in a printable PDF document in ColdFusion

cfdocument and cfhttp - display web pages in printable document cfdocumentDispalyWebPages.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 and cfhttp tag: how to display web pages in printable document</title> </head> <body> <cfhttp url="http://www.gmail.com/" resolveurl="yes"> <cfdocument format="pdf"> <cfoutput> #cfhttp.FileContent# </cfoutput> </cfdocument> </body> </html> More ColdFusion examples cflayout - collapsible layout area in a border type layout cflayout - splitter in a border type layout cfchart - 3d chart cfdocument - create printable pdf format document

How to create a PDF document in ColdFusion

cfdocument - create printable pdf format document cfdocumentPDF.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 create printable pdf format document in coldfusion</title> </head> <body> <cfquery name="qCourses" datasource="cfdocexamples" maxrows="10"> SELECT Course_ID, Number, Descript from COURSES </cfquery> <cfdocument format="pdf"> <h3 style="color:OrangeRed; font-style:italic"> cfdocument example: Printable pdf document </h3> <cftable query="qCourses" colheaders="yes" htmltable="no" border="no"> <cfcol header="Course ID" text="#Course_ID#" align="left"> <cfcol header="Number" ...

How to add page break in a PDF document in ColdFusion

Introduction In web development, generating dynamic PDF documents can be a common requirement, especially for creating reports, invoices, or printable pages directly from a web application. Adobe ColdFusion provides a powerful way to generate PDFs with the <cfdocument> tag, which makes it easy to convert HTML content into a PDF format. One of the key features often required in PDF creation is the ability to control page breaks, ensuring that content is properly structured and separated into different pages. This tutorial demonstrates how to implement page breaks using ColdFusion’s <cfdocumentitem> tag within a PDF document. In this example, we retrieve data from a database and display it in a PDF document with a page break separating different sections of the content. Understanding how to use the <cfdocumentitem> tag for page breaks is crucial for developers looking to control the layout of their ColdFusion-generated PDF documents. Database Query and Data Retrieval...