Docstoc

How to Enable Footer and Header in Dompdf

Document Sample
How to Enable Footer and Header in Dompdf Powered By Docstoc
					How to Enable Footer and Header in Dompdf
Very simple article that show you how to put an header or a footer on
every pages that dompdf generates.

<Steps
1Go into dompdf_config_inc.php and change the definition of
DOMPDF_ENABLE_PHP to true. (around line 308)<
2In your HTML that you are trying to convert into a pdf put something
like the code below right after your <body> tag.<

Code
<script type="text/php">
if ( isset($pdf) ) {
$font = Font_Metrics::get_font("helvetica", "bold");
         $pdf->page_text(72, 18, "Header: {PAGE_NUM} of {PAGE_COUNT}",
$font, 6, array(0,0,0));
}
       </script>

Related wikiHows
How to Work With PDF Files
How to Add a PDF to a Kindle
How to Print PDF Files
How to Copy Picture from PDF with ClassicPDF
How to Create a PDF File from PowerPoint with PDF995
How to Convert a Microsoft Word Document to PDF Format

<

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:24
posted:2/2/2013
language:English
pages:1