← Back to team overview

openerp-community team mailing list archive

Re: webkit report headers don't show up in pdf

 

On 10/25/2011 03:45 PM, Viktor Nagy wrote:
> I've just started to play around with report_webkit, and was using the
> sample addon to find out its features. I've found all the setting (I
> guess), and managed to put the "Base Sample" header with the C2C logo to
> the sample report when I switch on debug mode for the report, but the
> logo and text don't show up for non-debug mode.

Debug mode renders just the header template and body, and merges them to
simulate the HTML output that would be passed to wkhtmltopdf to render
the final PDF, to give you a chance to analyze the rendered HTML.
This can explain quite a lot of differences between the two modes.

> Is this a bug in wkhtmltopdf, the addon or my settings (it works with
> debug, but fails without debug) ain't correct?

I've experienced the same issue when I was using the default wkhtmltopdf
package that ships with Ubuntu 64bits (even on oneiric). This version is
apparently compiled against an "unpatched" qt lib, and therefore many
features are disabled, such as header and footer rendering (`man
wkhtmltopdf` mentions this)
I fixed this problem by installing a statically linked (therefore
bigger) version of wkhtmltopdf.
If this is your case, grab a "-static" build matching your platform on
http://code.google.com/p/wkhtmltopdf/ then unzip it e.g. in
/usr/local/bin, and change the executable path on the company form in
OpenERP, and it should fix the problem.

I will add a note in the description of the module to mention this.


Follow ups

References