Closed (fixed)
Project:
Views PDF
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2012 at 14:53 UTC
Updated:
28 Nov 2018 at 19:21 UTC
Jump to comment: Most recent
Comments
Comment #1
El Bandito commentedAfter exhaustive trawling I'm fairly certain that nobody has provided any docs or clues about how to achieve this.
I am tempted to think the solution is to create a module which registers an event itself and then hooks into the Views rendering process at "hook_views_pre_render" in order to fire the event. What makes me question this is that I don't understand why the Views PDF module doesn't provide such an event itself ?
Comment #2
El Bandito commentedFinally got this working. I will document how when I have also mastered sending the PDFs by email.
My fundamental problem was one of perspective. I was expecting to invoke my View to generate a PDF and then somehow fire an event and invoke the action provided by the module. In fact the action invokes the View itself and builds the PDF itself so all you actually have to do is register an event with Rules ( hook_rules_event_info ) and invoke the event at some appropriate point. In my case made a little more complicated by needing to pass an argument from the event through to the action which would then use it as an argument for the View.
Comment #3
j4 commentedHi,
I need to print pdf of node when node is created and also create a rule to send this pdf as an attachment to the user who created the node. Can you help me as your needs seem similar?
Thanks
jaya
Comment #4
star-szrHere's an example setup to generate one PDF per node:
admin/rules/trigger/add)/sites/default/files, you'll need the full path on disk) and use tokens to build the filename.Comment #5
alibama commented@Cottser - thanks = your recipe got me started for doing the process with Views Bulk Operations = http://blog.hsl.virginia.edu/drupalpress/views-pdf-vbo-rule-sets-thousan...
great work & thanks to the upkeepers :)
Comment #6
deejmer commentedI know this thread is heavily aged, but @cottser's example is great. I'm missing one last piece though - how could one then attach the rendered PDF back to the node its referencing in a file field?