-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
page count is now injected via placeholder as described in dompdf/dom…
…pdf#1636 Signed-off-by: Christoph Massmann <[email protected]>
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26cce38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the usage of this documented anywhere? Looking through the code, is the idea that I can place
__PDF_TPC__
somewhere in my html template, and that string will be replaced with the total page count? (Going to try this now, but would be nice if it was documented somewhere)26cce38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexleach - Did you get this working?
26cce38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marc, thanks for checking in. I came here from the dompdf issue that's tagged in the commit message, and erroneously thought it was included in the dompdf code.
After realising it wasn't in core dompdf, basically I used your code to implement the same in the pdf rendering plugin that I've been working on for a timesheet app I'm using.
It works well, but I'm currently fiddling around with how to make the page numbering align to the right of the margin, as close as possible anyway. The code aligns the text in
self::TOTAL_PAGE_COUNT_PLACEHOLDER
, so I am trying to get that to be one character wide (with say‌‌_‌
), but that's work in progress. Either way, yes I've got it working with your code better than I had it before, so progress! Thanks!26cce38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alexleach,
thanks for your feedback.
You're right, it exactly works like that (i.e.
__PDF_TPC__
will get replaced with the total page count).I have updated the README file and added this information.
Best regards,
Chris