<div dir="ltr">
Hello!<br clear="all"><div><div><div class="gmail-m_5233852375662242939gmail-m_-9208669814854298963gmail_signature"><div dir="ltr"><div><br></div><div>I'm using poppler to convert PDF document into XML file and I'm facing few problems with rounded coordinates.</div><div><br></div><div>In my opinion, the <span style="font-family:monospace,monospace">xoutRound</span> macro should be called only when generating complex HTML documents, but not inside the <span style="font-family:monospace,monospace">dumpAsXML</span> method (option : <span style="font-family:monospace,monospace">-xml</span>): when dealing with XML we wish to keep the floating precision.</div><div>(For backward-compatibility, this could be another option when calling <span style="font-family:monospace,monospace">./pdftohtml</span>)<br></div><div><br></div><div>Do you agree or did I miss anything?</div><div><br></div><div><br></div><div>PATCH utils\HtmlOutputDev.cc:<br></div><div><br></div><div>  763  - fprintf(f,"<image top=\"%d\" left=\"%d\" ",xoutRound(img->yMin),<wbr>xoutRound(img->xMin));<br>  764  - fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(img->xMax-img-><wbr>xMin),xoutRound(img->yMax-img-<wbr>>yMin));<br>  763  + fprintf(f,"<image top=\"%f\" left=\"%f\" ",img->yMin,img->xMin);<br>  764  + fprintf(f,"width=\"%f\" height=\"%f\" ",img->xMax-img->xMin,img-><wbr>yMax-img->yMin);</div><div><br></div><div><br></div><div>  771  - fprintf(f,"<text top=\"%d\" left=\"%d\" ",xoutRound(tmp->yMin),<wbr>xoutRound(tmp->xMin));<br>  772  - fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(tmp->xMax-tmp-><wbr>xMin),xoutRound(tmp->yMax-tmp-<wbr>>yMin));<br>  771  + fprintf(f,"<text top=\"%f\" left=\"%f\" ",tmp->yMin,tmp->xMin);<br>  772  + fprintf(f,"width=\"%f\" height=\"%f\" ",tmp->xMax-tmp->xMin,tmp-><wbr>yMax-tmp->yMin);<br></div><div><br></div><div><br>Regards,<br></div><div>--Thibaut</div></div></div></div></div>

</div>