Community & Support

how to generate word documents or pdf files in drupal for list of nodes

i m newbie to drupal presently i m using drupal 6 version

i have to generate the word document files for the selected nodes say (/node/166,node/21)

we dont have any module to generate word documents or to generate pdf files with group of nodes we can generate pdf file for one object

to generate word document file in php
will be

<?
$fp = fopen("test.doc", 'w+');
$str = "This is the text for the word file created through php programming
test to create a doc file from php";
ob_start();
include('index.php?q=1,2');
$result = ob_get_clean();

fwrite($fp, $result);
echo "executed";
fclose($fp);

?>
in the above example it generates the word documents,

so i thought including 'www.example.com/print/166' in the **include** function will do the things
and i can call to the same function with selected nodes....

later realised that this wont help us because drupal structure is completely different it
uses only index.php and hooks to serve the requests
and mostly include function needs php fields as inputs

now i am no where to solve my problem
can any one help me to generate pdf files with bunch of nodes.

please guys
thanks in advance...

Comments

I am about to do a similar

I am about to do a similar thing - generate a pdf from a list of nodes in a newsletter and I was planning to use tcpdf.

the solution is generate the view

just design a veiw with the selected nodes.....
and name it as printnodes

just call to this url printpdf/printnodes/
u get the list of nodes in one pdf file

hope this solves ur problem