I'm trying to use the Print module to generate pdf's and epubs of the stories on my site. However, I need to get Print to generate these files from the story page and then generate the pdf with ALL nodes that reference the story, the chapters. I'm not sure how to do this as I've never really done tpl.php's before. I need some help here.

Can print be made to work with a panels layout that shows what I want in it? I have a panels layout working mostly for an example of what I'm trying to achieve.


How do I make the tpl.php file I need to make that end up as my print selections for Stories?


Seeing the url for print layout works fine, my first suggestion would be, that you can actually do it simply by activating the pdf module and changing the path to trigger the 'pdf-generator':

print-path: http://fanbards.net/print/stories/13008

printpdf-path: http://fanbards.net/printpdf/stories/13008

…you may find further useful info about this on the documentation page for Print.

  • I tried that initially, but the module wouldn't do it, it would only output the node content. I created a tpl.php file, it's not greate and it depends on views but it worked. I'll post that here – CW Smith Mar 25 '15 at 14:35

Well, I managed to create a content type based template for print. I'm not sure if it's the best way but it's what I came up with. Any improvments would be appreciated.



language; ?>" version="XHTML+RDFa 1.0" dir="dir; ?>"> ' /> ' type='image/x-icon' />

$node)); ?> type)): ?> nid); ?> nid); ?> nid); ?> $source_url, 'node' => $node, 'cid' => $cid)); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.