Gentoo Archives: gentoo-user

From: felix@×××××××.com
To: gentoo-user@l.g.o
Subject: [gentoo-user] Converting HTML to PDF or PS
Date: Tue, 27 Nov 2007 22:01:52
Message-Id: 20071127215310.GA29250@crowfix.com
1 I need to convert web pages to PDF files under program control,
2 perhaps from cron, perhaps a backgrounded batch job. An X window
3 enviornment could probably be set up, but I'd prefer not going thru
4 that hassle. Point and click manual intervention just won't do.
5 These web pages use Javascript; some render so-so without javascript,
6 some don't render at all well. What I would like is some firefox (or
7 Konqueror or ...) command line option to render the page and save it
8 as any other format -- jpg, pdf, ps, doesn't matter. Cups-pdf sounds
9 like it might help, if I could use command line options to tell
10 firefox to print the page. I see that firefox 3 will have a print to
11 PDF option, and that might be good enough, but it's not available now,
12 and there'd need to be some way of starting firefox and telling it to
13 print under program control.
14
15 Firefox has some command line options to help, such as height and
16 width. And none of them (that I can find) do anything useful like
17 print to pdf and exit.
18
19 I am open to any suggestions which can be automated. If a perl
20 program could run firefox as a child under X and feed it X input, or a
21 perl CPAN module which understands javascript, or even if there are
22 commercial programs which do this, I am all ears.
23
24 --
25 ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
26 Felix Finch: scarecrow repairman & rocket surgeon / felix@×××××××.com
27 GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
28 I've found a solution to Fermat's Last Theorem but I see I've run out of room o
29 --
30 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Converting HTML to PDF or PS Ralf Stephan <ralf@×××××××××××××.de>