<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Could you post a PDF example? Poppler issues can be reported at <a href="https://bugs.freedesktop.org/enter_bug.cgi?product=poppler" class="OWAAutoLink" id="LPlnk359916" previewremoved="true">https://bugs.freedesktop.org/enter_bug.cgi?product=poppler</a></p>
<p>Are you rendering to the screen or to a file? pdftocairo and pdftoppm both have antialiasing options.</p>
<p>I think that Splash filling is done in poppler/<span>SplashOutputDev.cc and <span>Gfx.cc. The type of fill depends on the commands in the PDF, so probably the first step would be looking at the PDF to see how it draws the notes. Hopefully one of the poppler
developers will have more detailed advice.</span></span></p>
<p><span><span>Regards, William</span></span></p>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> poppler <poppler-bounces@lists.freedesktop.org> on behalf of pqt@LEFerguson.com <pqt@LEFerguson.com><br>
<b>Sent:</b> Tuesday, March 21, 2017 2:06 PM<br>
<b>To:</b> poppler@lists.freedesktop.org<br>
<b>Subject:</b> [poppler] Scaling factor and placement accuracy</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">OK, this is going to seem awfully picky, so with apologies in advance.<br>
<br>
Can anyone offer some guidance as to whether scale factors, when doing a renderToImage, have an internal effect on accuracy?<br>
<br>
I have been chasing a very minor, but very annoying issue, and I think it comes down to what scale factor is in use. The application I wrote dynamically scales the PDF page image to the nearest size it can to completely fill the page while maintaining aspect
ratio.<br>
<br>
This displays music. The music is sometimes (specifically when coming from notation software) individual items, where each note is a PDF element. In those cases, sometimes, not often but sometimes the notes are misplaced a bit. I am attaching an example.
I actually have seen much worse, but I had this handy with all the debugging.<br>
<br>
On the bottom example it is a screen shot of Adobe's reader. The top is Poppler's rendering at scale 150. The middle is the problem example, it is scaled 98.1818 (I have rescaled the screen shots to be the same size in photoshop to produce the collage for
viewing).<br>
<br>
Notice the ever so slightly higher position of the F's (second from top note) on the middle staff. I've tried to indicate the center with the hand-drawn arrow.<br>
<br>
That may seem like a slight issue, but these are occurring quite a lot, and they fool the eye when sight reading causing you to think it is the wrong note.<br>
<br>
Originally I thought it was the notational software, but Adobe's viewer, and even Poppler at some scaling factors places them perfectly. At others they are shifted.<br>
<br>
I plan to now do some experimentation with different roundings, and try to see a pattern, but for people who know the code ... is there any guidance? Like use integers, or some other limitations on scale factors? Or perhaps are there any compilation options
that impact the accuracy of the calculations? <br>
<br>
This is the latest committed version of poppler pulled and built from source today with the default rendering engine (Splash) and with hints Antialiasing, TextAntialiasing, and ThinLineSolid turned on . The problems have been on the Raspberry pi, so it's 32
bit os, but both the top and middle example in the attachment are on the Pi, so it is not always an issue.<br>
<br>
Anyway, again apologies if this seems like an awfully trivial item, but was just hoping someone may have encountered similar issues and had any advice.<br>
<br>
Linwood Ferguson<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>