<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Michael,<br>
<br>
Thanks for your suggestion - I'm still struggling with this.<br>
Here's the only difference between my input FO files:<br>
<br>
<blockquote><small>$ diff a1.fo b1.fo </small><br>
<small>5c5</small><br>
<small>< <fo:list-item-body
start-indent="body-start()"><fo:block id="Paragraph_4"
font-size="12pt" font-family="Times New Roman, Times, Symbol, serif"
font-weight="bold"><fo:inline>Project Name:
</fo:inline><fo:inline>Amex</fo:inline></fo:block></fo:list-item-body>
</fo:list-item></small><br>
<small>---</small><br>
<small>> <fo:list-item-body
start-indent="body-start()"><fo:block id="Paragraph_4"
font-size="12pt" font-family="Times New Roman, Times, Symbol, serif"
font-weight="bold"><fo:inline>Project Name:
Amex</fo:inline></fo:block></fo:list-item-body>
</fo:list-item></small><br>
</blockquote>
<br>
<br>
Here's the difference in the XEP files (intermediate format):<br>
<blockquote><small>$ diff a1.xep b1.xep </small><br>
<small>18,19c18,19</small><br>
<small>< <xep:text value="oject Name: " x="137894" y="737704"
width="64632"/></small><br>
<small>< <xep:text value="Amex" x="202526" y="737704"
width="29988"/></small><br>
<small>---</small><br>
<small>> <xep:text value="oject Name: " x="137894" y="737704"
width="63972"/></small><br>
<small>> <xep:text value="Amex" x="201866" y="737704"
width="29988"/></small><br>
</blockquote>
<br>
The PS:<br>
<blockquote><small>173c173</small><br>
<small>< 202.526 737.704 moveto</small><br>
<small>---</small><br>
<small>> 201.866 737.704 moveto</small><br>
</blockquote>
<br>
and finally when I convert to an image format (PNG) I'm finding that
the word "Amex" is a pixel or two displaced. The PNGs also have
different file sizes.<br>
I've attached all of the input and output files.<br>
<br>
Any idea what could be causing this difference?<br>
<br>
Regards,<br>
Justin.<br>
<br>
<br>
Michael Sulyaev wrote:
<blockquote cite="mid:48FD7D12.7070909@renderx.com" type="cite">Justin
Lipton wrote:
<br>
<blockquote type="cite">Is there a way to make the rendered PDF
ignore these redundant inlines such that the PDF output would be
identical in both cases?
<br>
We're trying to get PDF unit tests working and this seems to be
tripping us up. Stripping them out as part of the FO generation would
really complicate our existing XSLT transforms.
<br>
</blockquote>
<br>
Hello Justin,
<br>
<br>
Generated PDF files may not be binary identical even for one and the
same input, at least because they contain datetime fields which
obviously vary. File size may also differ, at least because compression
methods are not expected to produce outputs of equal size even if
inputs are of equal size.
<br>
<br>
I'd suggest not to waste time doing unit tests on PDF, but rather
consider using XEP Intermediate Format output for this purpose. These
are text files (XML actually), so diffing is fast, and if you need to
see the difference some way, xmldiff may help.
<br>
<br>
Another approach is to use a rasterizer (e.g. GhostScript) to produce
raster images from PDF files and compare them pixel-wise page-by-page.
Sounds a bit complicated, but it works, and may be extended to produce
visible 'symmetric' difference images for pages that differ, if you
need it.
<br>
<br>
Regards,
<br>
Michael Sulyaev
<br>
RenderX
<br>
<br>
-------------------
<br>
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
<br>
in the body of the message to <a class="moz-txt-link-abbreviated" href="mailto:majordomo@renderx.com">majordomo@renderx.com</a> from the address
<br>
you are subscribed from.
<br>
(*) By using the Service, you expressly agree to these Terms of Service
<a class="moz-txt-link-freetext" href="http://www.renderx.com/terms-of-service.html">http://www.renderx.com/terms-of-service.html</a>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title>Exari Signature</title>
<basefont size="2" face="Arial, Helvetica, sans-serif" color="#666666">
<div>
<p style="font-family: sans-serif;" align="left"> <strong>Justin Lipton</strong><br>
<a href="mailto:justin.lipton@exari.com">justin.lipton@exari.com</a><br>
Level 7, 10-16 Queen Street, Melbourne 3000 Australia <br>
Tel +61 3 9621 2775 | Fax +61 3 9621 2776 <br>
</p>
</div>
<div>
<p style="font-family: sans-serif;" align="left"> <strong>Exari Systems</strong><br>
Boston | London | Melbourne | Munich<br>
<a href="http://www.exari.com">www.exari.com</a></p>
<p style="font-family: sans-serif;" align="left"><strong>Really
Important Notice</strong><br>
<small>Actually, this is only important if this email was sent to you
by mistake or if someone sent it to you when they shouldn't have. If
you got it by mistake, please reply and tell us so we can re-send it to
the right person. If you got it from someone who should know better,
please tell them they're in big trouble. In either case, please don't
forward it on to anyone else. Or print it. Or talk about it. Otherwise
you'll be in big trouble too.</small><br>
<br>
<a href="http://www.exari.com/document-assembly.html"><img
alt="exari logo" src="cid:part1.07050205.06070801@exari.com"
align="bottom" border="0" height="24" width="72"></a><br>
<font size="1"><strong>For Contract Relief</strong></font> </p>
</div>
</div>
</body>
</html>