]> git.sesse.net Git - webpdf/blob - README
Add support for rendering URLs, finally!
[webpdf] / README
1 Very preliminary documentation; sorry about that. :-)
2
3 You'll need:
4
5   - A web server (I use Apache 2, with mpm-itk[1] to separate the ugliness
6     from the rest of the server installation).
7   - ImageMagick (http://www.imagemagick.org/).
8   - Perl (http://www.perl.org/), with the CGI module.
9   - OpenOffice.org (http://www.openoffice.org/ -- doh), tested with v1.1
10     only. See below for special configuration needed.
11   - GhostScript, probably almost any halfway recent version; newer ones
12     have better font support etc., though. (For some odd PostScript font
13     stuff, you might even need the latest AFPL version from CVS, if you
14     can live with its license.) http://www.ghostscript.com/ has it all.
15   - vim (http://www.vim.org/).
16   - gnome-web-photo, currently only available from GNOME's CVS
17     (http://cvs.gnome.org/viewcvs/gnome-web-photo/, do
18     cvs -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome co gnome-web-photo
19     to check out).
20
21 [1]: http://home.samfundet.no/~sesse/mpm-itk/
22
23
24 Configuration
25
26 mkdir output/
27 $EDITOR config.pm
28 $EDITOR index.html, so your site doesn't look like mine :-)
29
30
31 Special OpenOffice.org configuration
32
33 First of all, you'll need an X server (since OO.o needs one to do even -help).
34 Xvfb will do nicely:
35
36   nohup Xvfb :25 &
37
38 (Note that gnome-web-photo seems to be a bit picky about the color depth.
39 If you get all black images in your PDFs, add "-screen scrn 800x600x24"
40 to the Xvfb command line and see if it helps.)
41
42 Then, you'll need to log in as the CGI user (yes, yuck :-) ), run
43 OpenOffice.org for the first time, accept the license etc. Then you'll have
44 to add a new printer -- use spadmin (in the same directory as soffice), add
45 a new printer by the name of “pdf” (probably slightly misnamed, as it will
46 output PostScript, but OK). It's going to be a “PDF converter”, using
47
48   /whatever/path/you/have/cat-into "(OUTPUT)"
49
50 as command line, and your output directory as appropriate. Also remember to
51 set the page size if you don't happen to prefer Letter already.
52
53 Happy hacking :-)
54
55   -- Steinar H. Gunderson <sgunderson@bigfoot.com>, http://www.sesse.net/
56      (and of course, http://pdf.sesse.net/)