<div dir="ltr"><div>Hello,</div><div><br></div><div>I suggest to name the parameter "-noroundcoord" (insted of "-accuratecoordinates")<br></div><div>with that description: "do not round coordinates (with XML output only)"<br></div><div class="gmail_extra">Of course I'm open to any other suggestion<br></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra"><div><div class="m_7807933983545010549gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>In attachment the new patch with fixed spacing<br></div><div><br></div><div>--<br>Cordialement / Regards<br>Thibaut Brard<br></div></div></div></div>
<br><div class="gmail_quote">2018-06-20 0:19 GMT+02:00 Albert Astals Cid <span dir="ltr"><<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El dilluns, 11 de juny de 2018, a les 17:32:27 CEST, Thibaut Brard va <br>
escriure:<br>
<span>> Hello!<br>
> <br>
> I'm using poppler to convert PDF document into XML file and I'm facing few<br>
> problems with rounded coordinates.<br>
> <br>
> In my opinion, the xoutRound macro should be called only when generating<br>
> complex HTML documents, but not inside the dumpAsXML method (option : -xml):<br>
> when dealing with XML we wish to keep the floating precision.<br>
> (For backward-compatibility, this could be another option when calling<br>
</span><span>> /pdftohtml)<br>
> <br>
> Do you agree or did I miss anything?<br>
<br>
</span>The spacing is wrong, though that file spacing is nuts, that function at least <br>
seems to be reasonable and using two spaces for each indentation. Please amend <br>
the patch to do that.<br>
<br>
Also i don't think anyone would understand what<br>
"enable accurate coordinates output (for XML post-processing)"<br>
actually means. I would like a reword of the sentence, possibly including the <br>
word "round", something like "Do not round coordinates" or similar.<br>
<br>
What do you think?<br>
<br>
Cheers,<br>
Albert<br>
<div class="m_7807933983545010549HOEnZb"><div class="m_7807933983545010549h5"><br>
<br>
> <br>
> <br>
> PATCH utils\HtmlOutputDev.cc:<br>
> <br>
> 763 - fprintf(f,"<image top=\"%d\" left=\"%d\" ",xoutRound(img->yMin),<br>
> xoutRound(img->xMin));<br>
> 764 - fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(img->xMax-img-><br>
> 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-><br>
> yMax-img->yMin);<br>
> <br>
> <br>
> 771 - fprintf(f,"<text top=\"%d\" left=\"%d\" ",xoutRound(tmp->yMin),<br>
> xoutRound(tmp->xMin));<br>
> 772 - fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(tmp->xMax-tmp-><br>
> 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-><br>
> yMax-tmp->yMin);<br>
> <br>
> <br>
> Regards,<br>
> --Thibaut<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>