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

Jason Zaugg jzaugg at gmail.com
Fri May 2 10:29:27 PDT 2008


On Thu, Feb 7, 2008 at 1:24 AM, Michael Sulyaev <msulyaev at renderx.com> wrote:
>
>  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.
>

I am using pixel comparison of the PDFs in my test suite at the
moment. However, even this is not working 100% now that I am creating
a document with a non-white backround.

I am using the Java PDFRenderer library. See the attachment for the
two PDFs generated by XEP, and the rasterizations and difference
overlay.

This is probably just a bug in the PDFRenderer library, as Acrobat
displays both PDFs identically. But I could live with this bug if you
were able to produce stable PDF output within a given release of XEP.

In addition, being able to use bitwise comparisons as the first check
in my test suite will cut my functional test run time down by ~ 25%,
and help our productivity and generally make the developers happier :)

Have you considered this enhancement?

Thanks,

Jason Zaugg

EFG Financial Products
Zurich, Switzerland
jason.zaugg at efgfp.com



 <xsl:variable name="background-color">rgb(213, 214, 215)</xsl:variable>
 <fo:layout-master-set>
            <fo:simple-page-master master-name="A5"
page-height="210mm" page-width="148mm"
                                   margin-top="0.0pt"
margin-left="0.0pt" margin-bottom="0.0pt"
                                   margin-right="0.0pt">
                <fo:region-body margin-left="28.0pt"
margin-top="28.0pt" margin-bottom="28.0pt"
                                margin-right="28.0pt"
background-color="{$background-color}"/>
                <fo:region-before extent="28.0pt" precedence="true"
background-color="{$background-color}"/>
                <fo:region-after extent="28.0pt" precedence="true"
background-color="{$background-color}"/>
                <fo:region-start extent="28.0pt" precedence="false"
background-color="{$background-color}"/>
                <fo:region-end extent="28.0pt" precedence="false"
background-color="{$background-color}"/>
            </fo:simple-page-master>
        </fo:layout-master-set>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: different-pdfs-and-PDFRenderer-overlay.zip
Type: application/zip
Size: 14871 bytes
Desc: not available
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20080502/fff8a983/attachment.zip>


More information about the Xep-support mailing list