- 感谢您收到 0
How can I get the total number of pages in DOMPDF?
- btt
- [btt]
-
帖子作者
- 新手上路
-
Less
更多
2024-07-22 01:02 - 2024-07-22 01:04 #191
by btt
class
And then you may enable PHP inline using the following line
The rest of the codes are correct and will show a page number and page count
Update As pointed out by @london-smith, this also works for DomPDF 0.8.1
DOMPDF - Page x of y | Fabrik Forum
新帖
This means you have to create a new instance ofSince Releases · dompdf/dompdf · GitHub
Code:dompdf, theCode:0.7.0file has been removed (and is no longer referenced): all dompdf options should be set at run time.Code:dompdf_config.inc.php
Code:
Options
Code:
$domPdfOptions = new Options();
Code:
$domPdfOptions->set("isPhpEnabled", true);
Code:
<script type="text/php">
if (isset($pdf))
{
$x = 72;
$y = 18;
$text = "{PAGE_NUM} of {PAGE_COUNT}";
$font = $fontMetrics->get_font("helvetica", "bold");
$size = 6;
$color = array(255,0,0);
$word_space = 0.0; // default
$char_space = 0.0; // default
$angle = 0.0; // default
$pdf->page_text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle);
}
</script>
DOMPDF - Page x of y | Fabrik Forum
-
Joomla! 5.4
You must update to Fabrik4.5.6 (available since August) if you are running Joomla!5.4See Announcements
-
Fabrik 4.6.2 for J!4 and J!5 is out
For details (especially if you already updated to F4.6 or F4.6.1) see Announcements
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.
You should upgrade or use an alternative browser.
DOMPDF - Page x of y
- Thread starter Trembowiecki
Last edit: 2024-07-22 01:04 by btt.
微信

Latest
-
- чернила для принтера epson l3150
- 在 主论坛 / 市场报道
- by Marinawgw
- 2026-02-12 04:11
-
- аренда блок контейнера
- 在 主论坛 / 市场报道
- by Antoniofy
- 2026-02-11 12:55