[poppler] Scaling factor and placement accuracy
pqt at LEFerguson.com
pqt at LEFerguson.com
Wed Apr 12 01:39:04 UTC 2017
I hate to reopen this question, and please feel free to ignore it but…I have a bit of information should it be useful one day. I realize that at the core there are issues with trying to precisely position things… but this seems to be a case where sometimes poppler does it better than others at the same size and same document.
I tried a few programs. Evince worked perfectly, never saw any displacement. qpdfview did exactly as my program did. I don't know glib but tried to work through evince, and the calls are of course quite different. Short of converting my program to using glib, I am not sure if I can learn anything from how evince uses poppler?
Out of curiosity I switched to Arthur, and the problem appears to have gone away. I need to test a lot more cases, but it may be a solution for me.
If that doesn't work I may try to learn enough about the glib calls to use it instead, as evince does, and see what happens.
I looked at the wrapper for renderToImage in the qt5 source, and nothing jumped out at me as even related to this -- it looks like all the element placement was buried much deeper.
The Arthur backend results do not look quite as good in general as evince does at the same scale, though both are precisely positioned, so it appears a usable workaround for me so far.
I just thought I would pass on these examples in case it rings a bell for anyone and you have suggestions, or might someday be useful. The examples are at the same resolution (96 dpi = 100% in evince and qpdfview).
Anyway, comments welcomed, if it's not
Linwood
PS. In the examples, it's the E above middle C of interest (2nd from the top on the left and first from the top on the right). It should be centered on the line. Blow the image up 5 times or so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170412/4bc3d4ec/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_program_arthur.jpg
Type: image/jpeg
Size: 5044 bytes
Desc: my_program_arthur.jpg
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170412/4bc3d4ec/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qpdfview.jpg
Type: image/jpeg
Size: 6002 bytes
Desc: qpdfview.jpg
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170412/4bc3d4ec/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evince.jpg
Type: image/jpeg
Size: 5649 bytes
Desc: evince.jpg
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170412/4bc3d4ec/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_program_spash.jpg
Type: image/jpeg
Size: 6002 bytes
Desc: my_program_spash.jpg
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170412/4bc3d4ec/attachment-0007.jpg>
More information about the poppler
mailing list