Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I would like to print as PDF the same node rendered in 2 differents view modes.
Is it feasible ? Should I use any specific URL for that ?
Many thanks in advance.
Comments
Comment #1
misterpo CreditAttribution: misterpo commentedI have found a workaround by activating the "Print" view mode on my content type.
If I go to /printpdf/%nid%, I get the "Print" view mode displayed.
If I go to /printpdf/%nid%/whatever, I get the "Default" view mode displayed.
Of course this workaround works is dirty and works with only 2 view modes.
Anybody having a better idea ?
Comment #2
misterpo CreditAttribution: misterpo commentedHi,
My workaround is not an acceptable solution as I have to print 3 different views aof the same content type.
Please help.
Comment #3
misterpo CreditAttribution: misterpo commentedI am really sorry to insist but I would like to know if it is planned to add this feature.
I am currently working on a big Drupla Back Office project and the critical issue is the ability to generate multiple PDF printings (more than 4) of the same content type.
As far as I know, this module is the only option for what I want to achieve.
Many thanks in advance for your support.
Comment #4
misterpo CreditAttribution: misterpo commentedHi,
I have finally figured it out.
First I setup URL patterns with Pathauto for my content type like node_type/[node:nid]
Then I use View mode page plugin to generate the URL patterns node_type/%/view_mode (% representes the node ID in my case) in my content type's view mode.
The URL /printpdf/node_type/%/view_mode leads prints out a PDF file containing my view mode fields.
Working like a charm.
Comment #5
giupenni CreditAttribution: giupenni commentedThis tricks works for me, you have save my day. :-)