Printing pdf's from TJ3 - wkhtmltopdf / wkhtmltoimage works well

645 views
Skip to first unread message

astaines

unread,
Oct 3, 2011, 11:55:26 AM10/3/11
to TaskJuggler Users
Hi,

I needed to print out the Gantt chart form TJ3 for a grant
application. The advice on the forums was to use a browser, and then
'Print to pdf'. This didn't work, either in Firefox 6.0 or Konqueror,
as the various bars and shadings did not get printed.

I then tried wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) which
worked like a dream. I also tried wkhtmltoimage to produce a png
image, which worked even better, but was a very large file. It works
fine on Gentoo Linux. As far as I can see there are Windows and Mac
packages available, if you need them.

No idea if this is just a Linux quirk, but it saved me a good deal of
stress!

Anthony Staines

A.Nagy

unread,
Oct 4, 2011, 5:14:36 AM10/4/11
to TaskJuggler Users
Hi Anthony,

at the beginning I had the same problem.
In Firefox:
-> File -> Page setup. There you have an option 'print background'.
When you have selected it, FF should print all bars, shadings...

I just have a german version of FF. Maybe in the english one the
options menu
have another stile ???

But this was my problem. Set the option and then it should work!

greetings

alex

Chris Schlaeger

unread,
Oct 9, 2011, 10:41:09 PM10/9/11
to taskjugg...@googlegroups.com
On Tue, Oct 4, 2011 at 11:14 AM, A.Nagy <alexan...@gmx.de> wrote:
> In Firefox:
> -> File -> Page setup. There you have an option 'print background'.
> When you have selected it, FF should print all bars, shadings...

This can probably be solved with some CSS tuning. I think there is a
way of having different stylesheets for specific output devices. But I
haven't had time to look into this. If there is a CSS expert
listening, I'm definitely open for an improved version of the
stylesheet.

> On Oct 3, 5:55 pm, astaines <anthony.stai...@gmail.com> wrote:
> > I then tried wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) which
> > worked like a dream. I also tried wkhtmltoimage to produce a png
> > image, which worked even better, but was a very large file. It works
> > fine on Gentoo Linux. As far as I can see there are Windows and Mac
> > packages available, if you need them.

I've looked at wkhtmltopdf a few months ago. Nice concept, but a very
heavy dependency. Hard to deploy on even those platforms that it
supports. Does not work on Windows. So, I've discarded the idea again.
But some CSS tuning could probably get us to the same result.

Chris

Reply all
Reply to author
Forward
0 new messages