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

From: Jason Zaugg <jzaugg@gmail.com>
Date: Wed Feb 06 2008 - 05:53:02 PST

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.

The page master now looks like this:

<fo:simple-page-master master-name="pagemaster1" page-height="845.0pt"
page-width="598.0pt" margin-top="10.0pt" margin-left="10.0pt"
margin-bottom="10.0pt" margin-right="10.0pt">
<fo:region-body background-color='white' margin-left="28.0pt"
margin-top="28.0pt" margin-bottom="28.0pt" margin-right="28.0pt"/>
<fo:region-before background-color='white' extent="28.0pt" precedence="true"/>
<fo:region-after background-color='white' extent="28.0pt" precedence="true"/>
<fo:region-start background-color='white' extent="28.0pt" precedence="false"/>
<fo:region-end background-color='white' extent="28.0pt" precedence="false"/>
</fo:simple-page-master>

Is this the simplest way to acheive a white page background?

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. I'd guess that the white rectangles for each region are
being sorted based on Java object ID somewhere, and hence are output
in an instable order.

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)

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

Regards,

Jason

result-1.pdf snippet:

%PDF-1.4
%
5 0 obj
<</Length 6 0 R
>>
stream
1 G
1 g
10 38 m
10 807 l
38 807 l
38 38 l
h
f
10 10 m
10 38 l
588 38 l
588 10 l
h
f
10 807 m
10 835 l
588 835 l
588 807 l
h
f
560 38 m
560 807 l
588 807 l
588 38 l
h
f
38 38 m
38 807 l
560 807 l
560 38 l
h
f

-------------------------------
Result-2.pdf snippet

%PDF-1.4
%
5 0 obj
<</Length 6 0 R
>>
stream
1 G
1 g
560 38 m
560 807 l
588 807 l
588 38 l
h
f
10 38 m
10 807 l
38 807 l
38 38 l
h
f
10 807 m
10 835 l
588 835 l
588 807 l
h
f
10 10 m
10 38 l
588 38 l
588 10 l
h
f
38 38 m
38 807 l
560 807 l
560 38 l
h
f

-------------------
(*) 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 06:57:47 2008

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2008 - 06:57:52 PST