Add option to set theme used for entity_print rendering

Created on 13 March 2017, over 7 years ago
Updated 20 January 2024, 5 months ago

We use entity_print to generate PDF files programmatically.

This is done upon multiple events triggered by end-users (default theme), in the admin-backend (with the admin theme) and command-line (default theme again).
We used this code to get this done: https://www.drupal.org/node/2831952#comment-11871535 β†’
We included our PDF template files in the default theme.

The problem is that when the admin-theme is active, the templates and css of the default theme are not used for the PDF rendering.
Therefore those PDF's look really bad.

Some questions:
- Is it possible to pass the theme that must be used to render the PDF somewhere as config option? Like how?
- Is it best-practise to move the template, CSS and preprocessors to the custom module that handles the PDF-rendering?
- Is it best-practise to create a separate theme for PDF rendering?

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands ndf Amsterdam

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024