Problem/Motivation
The printable ticket PDF is assembled in PHP by TicketBuilder::document(): it wraps the rendered ticket bodies in a full HTML document (doctype, head, an embedded stylesheet, body) with a page break between tickets. The ticket body itself is already a Twig template (the yoyaku_ticket theme hook), but the surrounding page and its print CSS are hand-built strings, so a site cannot restructure the printed page or restyle it without patching the module.
Proposed resolution
Add a theme hook (for example yoyaku_ticket_document) backed by a Twig template that renders the page wrapper and embeds the print styles, and route document() through the renderer. Keep the styles embedded rather than in a library, since the PDF renderer (dompdf) ignores an external stylesheet, the same reason the mail summary template carries its styles inline.
Remaining tasks
- Add the theme hook and default template.
- Route the document assembly through the renderer, keeping the page break between tickets.
- Update tests and documentation.
Issue fork yoyaku-3613189
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented