I have been able to create PDFs of full nodes via urls like /drutex/pdf/{nid}, but it there a way I can generate a PDF of the output of a view? The alternative is using a custom module to create a cronjob to put the correct information into a new node, then creating a PDF of that.

Comments

inforeto’s picture

try inserting the insert_view module (or insert the view manually with php).

DragoonBoots’s picture

I get all kinds of weird errors when I use that PHP code. The exact errors are:

  • warning: Invalid argument supplied for foreach() in /home/.zerlina/dkeenan/drupal.testing.dankeenan.org/sites/all/modules/views/views_query.inc on line 81.
  • warning: Invalid argument supplied for foreach() in /home/.zerlina/dkeenan/drupal.testing.dankeenan.org/sites/all/modules/views/views_query.inc on line 16.
  • warning: Invalid argument supplied for foreach() in /home/.zerlina/dkeenan/drupal.testing.dankeenan.org/sites/all/modules/views/views_query.inc on line 195.
  • warning: Invalid argument supplied for foreach() in /home/.zerlina/dkeenan/drupal.testing.dankeenan.org/sites/all/modules/views/modules/views_node.inc on line 801.
  • warning: Invalid argument supplied for foreach() in /home/.zerlina/dkeenan/drupal.testing.dankeenan.org/sites/all/modules/views/views_rss.module on line 56.

Underneath that, nothing happens.

DragoonBoots’s picture

I made a typo when I changed the lines of code mentioned. However, It outputs a PDF containing the PHP code, not the output of the code. You can see the page here

inforeto’s picture

If it won't load the insert_views module filter, then try with the contemplate module, or using a php snippet within the node.

If still won't work then open an issue on drutex module for a feature request.
It might have a quick fix just by loading the node after the filters as other modules do.

Meanwhile, a possible workaround is to use the cck viewsfield module, but you can't use arguments.