Pass multiple ids as Views Arguments in the Rule action Save PDF as file on server I'm using views PDF to print out a list of nodes on a single PDF, one per page.
Now I have more than 1000 nodes/pages on a single generated pdf, so I'm trying to use VBO and Rules to create a view where I can filter/select the nodes I need and execute a Rule component that saves the resulting pdf on the server and sets a field "printed" to "yes" on those nodes.

The problem is that every time I fire my Rule the saved PDF has just the last selected node via VBO. 
On the "Views Arguments" of the "Save PDF as file on server” action, instead of [node:nid] I've tried writing manually some node ids (eg. 1,2,3...)  and it works fine: the saved PDF has all the written nodes printed out.

Probably I have to write some PHP code to print the VBO-passed ids as a single csv argument.
I've tried something like this and doesn't work, blank pdf page. How to debug?

&lt;?
$vboNids=arg(1);
echo implode(",",$vboNids);
?&gt;


Thanx in advance.
If I would like to save those files using vbo then I would try to create drupal action in your own module. And in this case you wouldn't need rules. Or you could revoke rules event if you would want to with rules_invoke_event function;

function mymodule_action_info() {
  return array(
    'dosomethinggoodfunction' =&gt; array(
      'type' =&gt; 'node',
      'label' =&gt; t('Do something'),
      'configurable' =&gt; FALSE,
      'triggers' =&gt; array('node_save'),
    ),
  );
}
function dosomethinggoodfunction($node) {
  // function to do some good stuff.
}