Re: [xep-support] Order of region background-color in PDF output from regions is non-deterministic

From: Michael Sulyaev <msulyaev@renderx.com>
Date: Wed Feb 06 2008 - 15:24:20 PST

Jason Zaugg wrote:
> I have recently updated my layouts to use a white page background
> color. Before, the documents were transparent, and this looks ugly in
> certain PDF viewers.
>
> My reading of the XSL spec suggested that I should to apply
> background-color='white' to all regions. This indeed fixed the visual
> problem.
>
> <fo:region-* background-color='white' ...
> Is this the simplest way to acheive a white page background?

Hello Jason,
Yes, this is the simplest and the proper way to achieve it.

> Unfortunately, the PDF output from XEP for Java version Version 4.10
> now varies each time it is run. While there are no visual differences,
> the unstable output makes it more difficult to test that two PDFs are
> identical.

Indeed static regions come out in an unpredictable order, but the
Recommendation does not specify which is the correct order. If regions
have borders (which is a handy extension) visual effects may appear as well.

> We are able to run a tool to visually compare the PDFs as a
> workaround, but this is much slower than comparing the PDF bytes
> (stripped of CreationDate / ModDate / ID fields)

I would not rely on bitwise comparison of PDF files, even after
filtering out CreationDate, ModDate, ID fields. It may possibly fail if
settings change, or if RenderX changes the PDF back-end code.

Using GhostScript for batch-mode PDF->PNG[*] rasterization at 72dpi is
both fast and accurate enough for bitwise comparison of PNG images. I
use this approach regularly.

> Is it possible to update XEP to make the PDF output predictable?

We will consider this as a request for enhancement, although no promises
can be given at the moment.

-- 
Best regards,
Michael Sulyaev
http://www.renderx.net
http://www.renderx.com
mailto:support@renderx.com
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Wed Feb 6 16:36:12 2008

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2008 - 16:36:18 PST