Note to all: this module is majorly messed up – am leaving this warning here until http://drupal.org/node/1494820 is resolved – briefly the template files get deleted and the output becomes munged after ~1,000 pdfs are generated. Also while some of my early tests were cranking ~100-200 pdfs per minute we’re seeing results now in the 3-5 per minute making this module unusable for large scale projects. here’s a patched version for D6views_pdf-patched
Views PDF allows you to output the results of a view onto a PDF. You can even upload an existing PDF to use a background template – pretty cool. For the Audio Visually inclined here’s your 3 minutes of fun. http://www.youtube.com/watch?v=PszjYSq7xQQ
Use Case: Generate 40,000 PDF’s with a user’s name on them and some other predefined fields and make these files accessible to the user for download.
Problem: creating the PDF’s on the fly is slow – so we need to have them all pre-generated
Solution: Used Cottser‘s writeup here http://drupal.org/node/1415380#comment-5701968 and modified it to be a rule set instead of a rule – with argument type node. Under that added one rule that ended up looking like this
As you can see the rule requires a pdf view – so hopefully you’ve already got one of them here are some shots of mine
and here are
the argument settings. Now earlier we mentioned that the pdf needs to be accessible to users, so back over in our rule set we take an action – we load a referenced user (the user is referenced in the node itself through a user reference cck field) so our final rule set ends up looking like this
Ok – almost finished. Now that we have a rule set we need to add this to a views bulk operation view so that we can “do the deed.”
I like Improved Admin because it gives you a nice starting point for working with Views Bulk Operations.. use whatever brings you the greatest joy.
Once your Rule Set is added to your VBO you may use it with any set of nodes you like. On our VMWare machine we were churning ~200 pdfs per minute, not too shabby.





Pingback: Drupal 6 + Modules we Love Volume 1, Views | Wordpress VS Drupal
Hi,
thx for your article !
I had the same problem (in D7), you could check
http://drupal.org/node/1494820#comment-5809560
and http://drupal.org/node/1230098 the correction sould’nt be too difficult to do in D6 too.
awesome, that’s great news = wish I had seen it a few days ago! I’ve patched D6 and will add the file to the top of the post until fixed.. thanks again!
how to add labels? haven’t tested this in the unformatted pdf version… in the table formatted version it’s pretty clear – you might try the “php before render” settings?
Thanks so much for posting this; it’s exactly what I needed. One hint: although it says in the action that one should use an absolute path as destination path for the files, it seems that just “files/xxx” works as well – one headache less when moving the rule from dev to production (I’m using Drupal 6 for the moment).