pdf rendering bug
The attached pdf-file doesn't render properly in sailfish documents app.
These Pictures (1st: jollaPhone-sailfish-documents-app; 2nd: Desktop or jollaPhone-aliendalvik-acroread) should look the same..
We have moved to a new Sailfish OS Forum. Please start new discussions there.
The attached pdf-file doesn't render properly in sailfish documents app.
These Pictures (1st: jollaPhone-sailfish-documents-app; 2nd: Desktop or jollaPhone-aliendalvik-acroread) should look the same..
I uploaded that file to a file hosting site:
http://www.cjoint.com/c/GEhvEaMkblh
When I view the preview here on Firefox/Android that bar doesn't correctly either. (I think that Firefox is using pdf.js.) On my Jolla C browser it's wrong too - and different. Which suggests that the pdf file is suspect.
I've sometimes used pdftk (or pdftk-qgui) on Linux to investigate and correct pdf files. I get a credit card statement that displays badly in Evince and I tried to determine whether it meets the pdf spec, but it's very complicated and I gave up. I just edit it with SED! You could try.
So it could be that the pdf is off spec, and Jolla docs - and pdf.js - are less good at coping with an off-spec file.
Added - after @lpr 's comment
Back on a Linux desktop I displayed the webpage above in Firefox - and it's correct. As is the blatt08 file when viewed in Fx's built-in pdf viewer.
On my Android tablet it displays OK in MuPDF - but not in (I think) pdf.js in Firefox. Why?
I uncompressed blatt08 (gedit was unhappy about the charset.) Usual gobbledegook; I couldn't find the offending 'bar' symbol, but I see there are a lot of embedded fonts so I wondered about those. What font does this 'bar' use?
http://pdf-analyser.edpsciences.org/result/b894cf44 shows that some fonts are not embedded - including 'symbol' (though I couldn't find many references to 'symbol' in the document.
Is it possible to embed those three missing fonts?
Indeed, according to Inkscape, the bar is of the font Symbol, which is missing as @DaveRo shown.
I guess Acroread is providing Symbol and Times font. Times italic is missing also which makes the 'x' letter and the '1' index don't look the same.
Damien Caliste ( 2017-05-09 10:22:24 +0300 )editI spent some more time investigating the 'stream' objects containing the embedded fonts. I learned a lot - but nothing more about this problem. One thing I discovered is that not all the stream font objects are in the same format. And one contains maths symbols.
It's interesting that Inkscape says the bar is in Symbol - in that case I ought to be able to find it in the pdf. But it would certainly explain per-device differences. But, if my Android tablet doesn't have the Symbol glyph, where does MuPDF get it from?
Embedding all the fonts is the obvious next step.
DaveRo ( 2017-05-09 11:02:24 +0300 )editThis thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2017-05-07 19:30:53 +0300
Seen: 281 times
Last updated: May 08 '17
unlimited zoom needed in document viewer [released]
[Fixed in 1.0.3.8] Crash when linking contacts? [not relevant]
Time slider usage in video player of Gallery app causes the app to hang [duplicate]
QAudioOutput isn't integrated with system volume and libresource like QMediaPlayer
Bug: E-Mail synchronization does not work as configured [released]
Word prediction should be always turned off when entering passwords in Android apps [released]
Don't enforce focus to textfield [answered]
[Implemented in 1.0.3.8] Email: Honour Reply-To header [answered]
is the bar part of the font? or a drawing? Are all fonts embedded in the pdf?
bomo ( 2017-05-07 22:01:44 +0300 )edit@bomo , seems not to be embedded because the x is looking different, importing this in inkscape seems to lead to the impression that the bar is not part of the font (it's a different object)...
lpr ( 2017-05-08 01:44:22 +0300 )editIf it renders correctly in Evince, it should render correctly in SFOS, same backend, i.e. Poppler. I will give a look this week. Maybe an older version of Poppler in SFOS ?
Damien Caliste ( 2017-05-08 10:36:45 +0300 )edit