Enables to generate a PDF from a View and merge it with a referenced PDF.
Uses
The module provides the route with the url of the following structure:
/views_pdf_merger/pdf/{ VIEW_NAME }/{ DISPLAY_NAME }/{ ID_OF_THE_PDF_FILE }
All you have to do is to create the link to this URL and insert it into the header or footer of a view.
Attention!
If your site is in the "development" mode, these instructions won't work. In this case you need to switch it to the "production" mode. One way to do it is using the following Drupal Console's command: drupal site:mode prod
1. Ensure that a user has the "Access Printable version of View" permission.
2. Let's say, the name of the field that stores the PDF file is "field_pdf". Add this field to the view.
3. Check the "Exclude from display" option.
4. Check the "Override the output of this field with custom text" and enter the Twig token to get the id of the PDF file, like this:
{{ field_pdf__target_id }}
5. Add to the header/footer of the view the "Text area".
6. Check the "Use replacement tokens from the first row" option.
7. Insert into the "Content" field the code like this:
<a href="proxy.php?url=https%3A%2F%2Fwww.drupal.org%2Fviews_pdf_merger%2Fpdf%2Fmy_view%2Fpage_1%2F%7B%7B+field_pdf+%7D%7D">{{ 'Generate PDF'|t }}</a>
also it's possible to add view_args as the query string:
<a href="proxy.php?url=https%3A%2F%2Fwww.drupal.org%2Fviews_pdf_merger%2Fpdf%2Fmy_view%2Fpage_1%2F%7B%7B+field_pdf+%7D%7D%3Fview_args%5B0%5D%3D3856">{{ 'Generate PDF'|t }}</a>




Dependencies
Sponsor
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Project categories: Content editing experience, Import and export
- Ecosystem: Entity Print
5 sites report using this module
- Created by wombatbuddy on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
