How or which template I have to grab to control the "View Pdf" output in my node. I don't need the whole content of the node, but only certain fields in my generated PDF. I use DOMpdf. And just editing the entity-print.html.twig doesn't seem to change anything?

What am I doing wrong.

Thnx

Comments

bavramor created an issue.

digdanlow’s picture

Hello! Did you clear the cache after modifying the entity-print.html.twig file? It may be cached and the changes won't reflect until you clear all caches.

ojchris’s picture

@digdanlow the quetion is how to get the individual fields of the content rather using the entire content so you can place the fields in the html market as you wish. The documentation mentions creating a twig template for the views mode pdf to achieve this:

Modifying entity content

To modify the content of your entity, you create a twig template using the 'pdf' view mode name (e.g. node--article--pdf.html.twig). In this template you can modify the markup as you normally do with other view modes using {{ content.field_example }} or {{ node.field_example }}.

I'm wondering how to achieve this for a views page.