{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/4913","labels_url":"https://api.github.com/repos/odoo/odoo/issues/4913/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/4913/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/4913/events","html_url":"https://github.com/odoo/odoo/issues/4913","id":55546033,"number":4913,"title":"Footer not getting placed at the last page in qweb report","user":{"login":"m3gadroider","id":7312324,"avatar_url":"https://avatars.githubusercontent.com/u/7312324?v=3","gravatar_id":"","url":"https://api.github.com/users/m3gadroider","html_url":"https://github.com/m3gadroider","followers_url":"https://api.github.com/users/m3gadroider/followers","following_url":"https://api.github.com/users/m3gadroider/following{/other_user}","gists_url":"https://api.github.com/users/m3gadroider/gists{/gist_id}","starred_url":"https://api.github.com/users/m3gadroider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3gadroider/subscriptions","organizations_url":"https://api.github.com/users/m3gadroider/orgs","repos_url":"https://api.github.com/users/m3gadroider/repos","events_url":"https://api.github.com/users/m3gadroider/events{/privacy}","received_events_url":"https://api.github.com/users/m3gadroider/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T22:20:02Z","updated_at":"2015-01-27T09:17:17Z","closed_at":"2015-01-27T09:17:17Z","body":"Im trying to modify the invoice qweb report and am trying to place the footer at the end of the report. I have had success with the html version, However when the pdf version is selected it doesn't get rendered as expected. I think this is an issue relating with wkhtmltopdf where it is unable to comprehend the css and place it at the end. \r\n\r\nAnother issue is that if trying to manipulate and placing the footer in an absolute position via the page height attribute in CSS the page height starts from the first page of the pdf instead of starting from each respective page. \r\n\r\n wkhtmltopdf also does not seem to understand CSS3 directives like @media print {} etc. which are generally used to get things done in printed pdf versions. "},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/71613925","html_url":"https://github.com/odoo/odoo/issues/4913#issuecomment-71613925","issue_url":"https://api.github.com/repos/odoo/odoo/issues/4913","id":71613925,"user":{"login":"sle-odoo","id":7601090,"avatar_url":"https://avatars.githubusercontent.com/u/7601090?v=3","gravatar_id":"","url":"https://api.github.com/users/sle-odoo","html_url":"https://github.com/sle-odoo","followers_url":"https://api.github.com/users/sle-odoo/followers","following_url":"https://api.github.com/users/sle-odoo/following{/other_user}","gists_url":"https://api.github.com/users/sle-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/sle-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sle-odoo/subscriptions","organizations_url":"https://api.github.com/users/sle-odoo/orgs","repos_url":"https://api.github.com/users/sle-odoo/repos","events_url":"https://api.github.com/users/sle-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/sle-odoo/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T09:17:17Z","updated_at":"2015-01-27T09:17:17Z","body":"footer at the end of the report: I advise you to read the code of the [get_pdf method](https://github.com/odoo/odoo/blob/8.0/addons/report/models/report.py#L179). A footer is always generated for each page,  but you can use the javascript to achieve what you want. Have a look at [subst.js](https://github.com/odoo/odoo/blob/8.0/addons/report/static/src/js/subst.js), you have the `page` and `topage` variables for the current and last page.\r\n\r\nabsolute position: i don't think it's the way to go. 1) Wkhtmltopdf will split the pages itself when the table is too big, so you don't *really* know when 2) the footer is not rendered with the page, it's another html page with its own structure and style, its own dom etc. No interaction with the body of the pdf.\r\n\r\nmedia print: The default wkhtmltopdf behavior is to select the screen media and we do not alter this. If you want wkhtmltopdf to use the print media, you'll have to add `--print-media-type` to the arguments.\r\n\r\nRegards"}}