PDF building with FOP

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: PDF building with FOP
Date: 2017-03-11 02:25:11
Message-ID: 8533aa6b-0f07-9d76-af3b-1f8515b1365e@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

As we are moving away from the old DSSSL toolchain, we also need to look
into how we are building PDFs.

The old way, using jadetex, is called by

make postgres-A4.pdf postgres-US.pdf

The new way, using FOP, is called by

make postgres-A4-fop.pdf postgres-US-fop.pdf

This already exists.

The questions for those who are building PDFs are

- Can you make the build work?

- Does the output look OK?

Some tips: FOP is extremely memory hungry. You will probably have to
fiddle with some Java memory settings to make it work. One way is by
edting ~/.foprc and set something like

FOP_OPTS='-Xmx1200m' # fop upstream binary installation
ADDITIONAL_FLAGS='-Xmx1200m' # centos/fedora
JAVA_ARGS='-Xmx1200m' # debian

It looks like you need at least -Xmx1000m, depending on the fop version.
More memory can make things faster. (Some of this could go into the
documentation.)

Note also that there are wildly different fop versions shipped with
distributions. Compare your package version or fop -v output with the
available versions at <https://xmlgraphics.apache.org/fop/download.html>.

I have done a fair amount of testing across different platforms. My
assessment is that it's good enough to move forward. It doesn't have to
work out of the box for everyone. But I want to make sure that those
who are building PDFs regularly are on board with this.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2017-03-11 03:19:45 Re: PDF building with FOP
Previous Message Peter Eisentraut 2017-03-11 02:08:56 Re: broken devel-pages styles