Maybe a stupid question... but I can´t get the header and footer area (the views basic settings...) into the pdf...

What I already tried/made is to create the views-pdf.tpl.php and so on in the views_pdf module folder and additionally the same set of tpl.php as an "individual" version (view-pdf--[view-name].tpl.php) in my sites/all/themes/[mytheme] folder... but this does not change the pdf output in any way...

Or did I miss some settings somewhere to switch header and footer on/off?

Comments

hunziker’s picture

First of all you cant using the template files, because the have no effects. (They were skipped.)

You can't using these areas. They where not printed to the PDF. The reason is simple. Normally you want to print static content in this areas. The positioning of those areas is a bit complicated. So to make this more easy you can use the template functionally. There you could upload a predefined PDF with some static content.

If this is not usable or not enough you could use two views. The first one to print more dynamical content (as replacement for the header / footer areas) and then you could "include" the other view with the different content.

hunziker’s picture

Status: Active » Closed (fixed)
ltrain’s picture

The Leading PDF template prints before every row.

The Succeeding PDF template prints after the main content.

How would I include a template before the main content (but not before every row)?

Thanks

cybermache’s picture

If the view header and footer were included on the pdf printout we could then include values found within the view itself. Such as including the name of the account user at the top, the date of the printout at the bottom, the calculated value of a column. The list could go on. Has anyone looked at how they achieve the WebformPDF? I've had great success with that but I can't use webforms for everything.

Edit: To be more specific - Webform2PDF (http://drupal.org/project/webform2pdf).

marcopanichi’s picture

same problem here.
I think it could be great to insert header and footer using the standard view field