Ask / Submit
1

pdf rendering bug

asked 2017-05-07 19:30:53 +0300

lpr gravatar image

wrong.pdf.gz

The attached pdf-file doesn't render properly in sailfish documents app.

as it is displayed on phone in documents app

as it is displayed in Gimp/evince/acroread/...

These Pictures (1st: jollaPhone-sailfish-documents-app; 2nd: Desktop or jollaPhone-aliendalvik-acroread) should look the same..

edit retag flag offensive close delete

Comments

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 )edit

If 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

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-08 01:02:53 +0300

DaveRo gravatar image

updated 2017-05-08 13:49:26 +0300

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?

edit flag offensive delete publish link more

Comments

@DaveRo I don't think it's the file. The original one is available here and not rendered correctly. Created with pdflatex-1.40 ... works in evince and acroread

lpr ( 2017-05-08 01:39:10 +0300 )edit

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 )edit

I 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 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2017-05-07 19:30:53 +0300

Seen: 187 times

Last updated: May 08