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.
Here is a patch to add compatibility for Views PDF This patch will allow the user to include a PDF display within another PDF display. This is useful for inserting tables, and other advanced layout in PDFs.
There is currently a known bug in Views PDF that duplicates included content #2072889: Include View Duplicates Content
So when evaluating this patch, please be aware the duplicated content is expected, for now, and it's not a problem with this patch or Views Field View.
Also, this is not my patch, it was contributed by Drupal user TBarina. I could suggest a commit message if it will help.
Comment | File | Size | Author |
---|---|---|---|
#2 | support_views_pdf-2442115-2.patch | 804 bytes | vegansupreme |
support for-views-pdf.patch | 709 bytes | vegansupreme | |
Comments
Comment #1
killua99 CreditAttribution: killua99 commentedI'll add this.
I don't know if this is correct, shouldn't be like $view->pdf = &$this->view->pdf; ?
Comment #2
vegansupreme CreditAttribution: vegansupreme commentedUpdated patch. I don't know about = &, but I'll defer to your judgement, Killua99.
Comment #3
killua99 CreditAttribution: killua99 commentedlook good, lets see what the bot says
Comment #4
dawehnerWel, I think maintainers of the modules disagree that this should be part of the module.
Comment #5
damiankloip CreditAttribution: damiankloip commentedHow about just using hook_views_pre_view and adding what you need there?
Comment #6
killua99 CreditAttribution: killua99 commentedWell the thing is, we've the same exact module *hacked* on views_pdf because of that lines. this views_field_view is very used in combination with views_pdf.
I'm gonna thing how we can alter that class from our module. Still we thought this is the right place, that views_field_view support views_pdf and not in the other way.
Please rethink one last time. You can find me on IRC drupal-contribute mostly or twitter to chat about it
I'll wait feedback from @vegansupreme tho.