Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2013 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/7661439 to your computer and use it in GitHub Desktop.
Save anonymous/7661439 to your computer and use it in GitHub Desktop.
<script type="text/php">
if (isset($pdf)) {
$pdf->page_script('
if ($PAGE_COUNT > 1) {
$font = Font_Metrics::get_font("yourfont", "normal");
$size = 9;
$pageText = "Page " . $PAGE_NUM . " of " . $PAGE_COUNT;
$y = $pdf->get_height() - 24;
$x = $pdf->get_width() - 15 - Font_Metrics::get_text_width($pageText, $font, $size);
$pdf->text($x, $y, $pageText, $font, $size);
}
');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment