Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling for PDF file is slow #3120

Closed
cyroxx opened this issue Apr 19, 2013 · 22 comments
Closed

Scrolling for PDF file is slow #3120

cyroxx opened this issue Apr 19, 2013 · 22 comments

Comments

@cyroxx
Copy link

cyroxx commented Apr 19, 2013

http://www.pharmazeutische-zeitung.de/fileadmin/pdf/PZ-Beilage-ApBetrO_2012_21.pdf

This looks odd and produces a bunch of errors. Actually, it is just those two:

downloadable font: table 'CFF ': failed to parse table (font-family: "g_font_p3_4" style:normal weight:normal stretch:normal src index:0)

and

downloadable font: rejected by sanitizer (font-family: "g_font_p3_4" style:normal weight:normal stretch:normal src index:0)

The other errors are in fact only siblings of the two mentioned above, as only the font family is different.

Note that the font is provided as a data url. Please also note that the document contains German umlauts.

EDIT
Tested under Firefox 20.0.1.

@marcosps
Copy link

Using Nightly, Ubuntu 12.10 and pdf.js development i jsut get this warning:

[07:47:53.914] "Warning: Error during font loading: ranges[(ranges.length -
1)] is undefined"

But, at first glance, the pdf looks OK...

2013/4/19 Matthias Jacob [email protected]

http://www.pharmazeutische-zeitung.de/fileadmin/pdf/PZ-Beilage-ApBetrO_2012_21.pdf

This looks odd and produces a bunch of errors. Actually, it is just those
two:

downloadable font: table 'CFF ': failed to parse table (font-family: "g_font_p3_4" style:normal weight:normal stretch:normal src index:0)

and

downloadable font: rejected by sanitizer (font-family: "g_font_p3_4" style:normal weight:normal stretch:normal src index:0)

The other errors are in fact only siblings of the two mentioned above, as
only the font family is different.

Note that the font is provided as a data url. Please also note that the
document contains German umlauts.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3120
.

Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Github: https://github.com/marcosps/
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"

@cyroxx
Copy link
Author

cyroxx commented Apr 19, 2013

Just to be exact on where to spot the error: The first pages are fine (except page 2, umlauts are missing).

But the table on page 4 for example has missing characters, wrong characters (probably due to umlauts/missing font), and misplaced characters. An example: In the first column, one of the lines in bold font should read "Der Betrieb von öffentlichen Apotheken".

@marcosps
Copy link

Matthias,

Thanks for some details :)

But here, I don't see any errors..

Just in page 2, there are some strange lines around the main image...

2013/4/19 Matthias Jacob [email protected]

Just to be exact on where to spot the error: The first pages are fine
(except page 2, umlauts are missing).

But the table on page 4 for example has missing characters, wrong
characters (probably due to umlauts/missing font), and misplaced
characters. An example: In the first column, one of the lines in bold font
should read "Der Betrieb von öffentlichen Apotheken".


Reply to this email directly or view it on GitHubhttps://github.com//issues/3120#issuecomment-16647717
.

Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Github: https://github.com/marcosps/
"Uma vida sem desafios é uma vida sem razão"
"A life without challenges, is a non reason life"

@yurydelendik
Copy link
Contributor

Is this still an issue?

@cyroxx
Copy link
Author

cyroxx commented Jun 28, 2013

Just tried that document again with FF 22.0 (32 bit, Win 7 x64) and the problem persists, although the errors I initially reported seem to be gone.

I am aware that this might not be much of a help. If I can do anything to provide you with more information, I will be glad to help in order to get this display error fixed.

PS: Maybe this issue is already fixed in a nightly build, as @marcosps indicated, but not yet shipped with FF 22.0? Or it is a Windows-only problem?

@cyroxx
Copy link
Author

cyroxx commented Jun 28, 2013

I made some screenshots to illustrate my problem (using page 4 of the above-mentioned document):
sumatra-vs-pdfjs
You can clearly see that there are some letters missing. However, the umlauts are rendered correctly which I think were previously wrong. So from what I see from skimming the document there is only a problem with capital letter A left.

@feanor12
Copy link

feanor12 commented Oct 5, 2013

It is still an issue in Firefox 24.0, but it works in Evince

@Snuffleupagus
Copy link
Collaborator

I can no longer reproduce this issue using the latest Nightly. My configuration is: Windows 7 (64-bit); Firefox Nightly 28 (buildID: 20131114030204), with HWA both on and off; and PDF.js 0.8.689.

Since I could reproduce this a week ago, I've tried to bisect where this was fixed. It turns out that this wasn't actually fixed by a patch in PDF.js, but it actually seems to have been resolved by a patch in Firefox.
I've tested recent versions of Firefox Nightly (all with PDF.js 0.8.689), and it appears that the pushlog containing the patch is: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=581d180a37f3&tochange=7b014f0f3b03.

The pushlog is fairly long, but after reading through it the most likely candidates seems to be https://bugzilla.mozilla.org/show_bug.cgi?id=936440, or maybe https://bugzilla.mozilla.org/show_bug.cgi?id=909344.
Please note that I really don't know anything about the code in these patches, but the descriptions are the only ones that seem to fit.

@timvandermeij
Copy link
Contributor

This is fixed now, but I'm labeling this as a performance issue because there is a big scrolling delay after a few pages are loaded.

@fkaelberer
Copy link
Contributor

The original issue is still (or again?) there:
Its broken in FF Dev Edition 36.0a2 (Win), FF nightly 37.0a1 (Win&Linux), Chrome 39 (Linux),
It works fine in FF 34 (Win&Linux)
Here is page 11 in FF 36 and 34:
zwischenablage01

@fkaelberer
Copy link
Contributor

I also consider the performance issue as not fixed, even with #5586: try to scroll down to page 25 or some other page with a lot of small text, and the large number of div elements will slow Firefox down significantly (there's one div for every two letters or so). If its not slow, try scrolling up an down for a while.

@Snuffleupagus
Copy link
Collaborator

@fkaelberer Since the font issue was actually fixed at one point (PR #4259), would you mind running git bisect to find out where it regressed again?

@fkaelberer
Copy link
Contributor

Last good commit: 2803c31... Merge pull request #5129 from Snuffleupagus/issues-4875-4881-tests
(viewer from preceding commit, #5127)
First bad commit: 6865c28... Merge pull request #5111 from nnethercote/better-cidchars
(viewer from following commit, #5136)

@fkaelberer
Copy link
Contributor

BTW, the "last good commit" wasn't really that good: On the right side (="last good commit"), the letter 'i' in the red text is not italic and the letter 'n' in the remaining text has the wrong font weight. These are exactly those letters which are missing on the left side (="first bad commit").

zwischenablage03

@timvandermeij
Copy link
Contributor

I can reproduce the missing letters and the scrolling performance is still a bit of a problem once you get half-way scrolling through the document.

@timvandermeij
Copy link
Contributor

There are sanitizer errors, which might explain the missing characters:

"PDF 956fb3798200a14d9840b55a0f7db9af [1.4 Adobe PDF Library 8.0 / Adobe InDesign CS3 (5.0.4)] (PDF.js: 1.1.203)" viewer.js:6633:0
downloadable font: CFF : failed to parse table (font-family: "g_font_98" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZGIDNVseoAAACcAAAB0U9TLzIEjypwAAACcAAAAGBjbWFwAAvgMwAAAtAAAAAsaGVhZKsnUAkAAAL8AAAANmhoZWEDugKaAAADNAAAACRobXR4AAAAAAAAA1gAAAAEbWF4cAABUAAAAANcAAAABm5hbWUlFWqxAAADZAAAAo5wb3N0AAMAAAAABfQAAAAgAQAEAgABAQElU0RPSVFOK0hlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAEBAUb4G/gciwwe+B0B+B4EHQAAoZsN+z37fvrc+ksFHQAAAWIPHQAAAWMRHQAAAAAdAAAAABL4HwwVHQAAAYcMJR0AAAGJDCQABgEBBg6lqsLfQWRvYmVJZGVudGl0eUNvcHlyaWdodCBcKGNcKSAxOTg4LCAxOTkwLCAxOTkzIEFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkLiAgQWxsIFJpZ2h0cyBSZXNlcnZlZC5IZWx2ZXRpY2EgaXMgYSB0cmFkZW1hcmsgb2YgTGlub3R5cGUtSGVsbCBBRyBhbmQvb3IgaXRzIHN1YnNpZGlhcmllcy5IZWF2eS9PcmlnRm9udFR5cGUgL1R5cGUxIGRlZkhlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAAAAAABAQEg90b3+QHT9/kD0/f5FSjaO+7u29vu7jvaKCg8PCgeDgAAAAEBARAdAAAAMx0AAAGdEvggDCZ8mvlemvtmmvc3lAb3oZTWlPy0kwd6nPlenPtqlwj3pZLvkvzplwn3JAr3PguMDA74iBQAAAAAAAMCJAH0AAUAAAKKArsAAACMAooCuwAAAd8AMQECAAAAAAYAAAAAAAAAAAAAABAA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AGsAbgBvAHcAbgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= PZ-Beilage-ApBetrO_2012_21.pdf
downloadable font: rejected by sanitizer (font-family: "g_font_98" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZGIDNVseoAAACcAAAB0U9TLzIEjypwAAACcAAAAGBjbWFwAAvgMwAAAtAAAAAsaGVhZKsnUAkAAAL8AAAANmhoZWEDugKaAAADNAAAACRobXR4AAAAAAAAA1gAAAAEbWF4cAABUAAAAANcAAAABm5hbWUlFWqxAAADZAAAAo5wb3N0AAMAAAAABfQAAAAgAQAEAgABAQElU0RPSVFOK0hlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAEBAUb4G/gciwwe+B0B+B4EHQAAoZsN+z37fvrc+ksFHQAAAWIPHQAAAWMRHQAAAAAdAAAAABL4HwwVHQAAAYcMJR0AAAGJDCQABgEBBg6lqsLfQWRvYmVJZGVudGl0eUNvcHlyaWdodCBcKGNcKSAxOTg4LCAxOTkwLCAxOTkzIEFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkLiAgQWxsIFJpZ2h0cyBSZXNlcnZlZC5IZWx2ZXRpY2EgaXMgYSB0cmFkZW1hcmsgb2YgTGlub3R5cGUtSGVsbCBBRyBhbmQvb3IgaXRzIHN1YnNpZGlhcmllcy5IZWF2eS9PcmlnRm9udFR5cGUgL1R5cGUxIGRlZkhlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAAAAAABAQEg90b3+QHT9/kD0/f5FSjaO+7u29vu7jvaKCg8PCgeDgAAAAEBARAdAAAAMx0AAAGdEvggDCZ8mvlemvtmmvc3lAb3oZTWlPy0kwd6nPlenPtqlwj3pZLvkvzplwn3JAr3PguMDA74iBQAAAAAAAMCJAH0AAUAAAKKArsAAACMAooCuwAAAd8AMQECAAAAAAYAAAAAAAAAAAAAABAAAAAAAAAAAAAAACoyMSoAAOAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= PZ-Beilage-ApBetrO_2012_21.pdf
downloadable font: font load failed (font-family: "g_font_98" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,T1RUTwAJAIAAAwAQQ0ZGIDNVseoAAACcAAAB0U9TLzIEjypwAAACcAAAAGBjbWFwAAvgMwAAAtAAAAAsaGVhZKsnUAkAAAL8AAAANmhoZWEDugKaAAADNAAAACRobXR4AAAAAAAAA1gAAAAEbWF4cAABUAAAAANcAAAABm5hbWUlFWqxAAADZAAAAo5wb3N0AAMAAAAABfQAAAAgAQAEAgABAQElU0RPSVFOK0hlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAEBAUb4G/gciwwe+B0B+B4EHQAAoZsN+z37fvrc+ksFHQAAAWIPHQAAAWMRHQAAAAAdAAAAABL4HwwVHQAAAYcMJR0AAAGJDCQABgEBBg6lqsLfQWRvYmVJZGVudGl0eUNvcHlyaWdodCBcKGNcKSAxOTg4LCAxOTkwLCAxOTkzIEFkb2JlIFN5c3RlbXMgSW5jb3Jwb3JhdGVkLiAgQWxsIFJpZ2h0cyBSZXNlcnZlZC5IZWx2ZXRpY2EgaXMgYSB0cmFkZW1hcmsgb2YgTGlub3R5cGUtSGVsbCBBRyBhbmQvb3IgaXRzIHN1YnNpZGlhcmllcy5IZWF2eS9PcmlnRm9udFR5cGUgL1R5cGUxIGRlZkhlbHZldGljYU5ldWUtSGVhdnktT1YtR0lHVVpBAAAAAAABAQEg90b3+QHT9/kD0/f5FSjaO+7u29vu7jvaKCg8PCgeDgAAAAEBARAdAAAAMx0AAAGdEvggDCZ8mvlemvtmmvc3lAb3oZTWlPy0kwd6nPlenPtqlwj3pZLvkvzplwn3JAr3PguMDA74iBQAAAAAAAMCJAH0AAUAAAKKArsAAACMAooCuwAAAd8AMQECAAAAAAYAAAAAAAAAAAAAABAAAAAAAAAAAAAAACoyMSoAAOAA4AADt/8WAGQDtwDqAAAAAAAAAAAAA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AAAAAAAA= PZ-Beilage-ApBetrO_2012_21.pdf

@brendandahl
Copy link
Contributor

I don't see any sanitizer errors anymore and it appears all the missing letters are better. Can someone else confirm?

@timvandermeij
Copy link
Contributor

@brendandahl The characters on page 11 are still missing for me on Windows 10 x64. It still looks like #3120 (comment), even with the most recent development add-on. The sanitizer errors are indeed gone.

@Snuffleupagus
Copy link
Collaborator

The characters on page 11 are still missing for me on Windows 10 x64.

Strange, WFM with: PDF.js 1.3.56, Firefox Nightly 45 (buildID: 20151204030208) with HWA on, and Windows 7 (64-bit).

page11

@fkaelberer
Copy link
Contributor

So the missing letters seem to depend on the browser, no matter which pdf.js version or OS is used.
From #3120 (comment) we know that the bug appeared in Firefox 35 or 36 and recent tests show that it disappeared again in Firefox 43 or 44.
Google Chrome 39 and 47 is also affected (Windows and Linux), but IE11 works.

Besides the missing letters, text selection is also not correct, there are too many word breaks. If I double click on "Apothekenbetriebsordnung" (in the header of page 11), then only a part of the word is selected. In Sumatra or Acrobat, text selection works as expected.

@NtH0
Copy link

NtH0 commented Sep 6, 2017

disappeared again in Firefox 43 or 44

FYI: missing chars are still an issue in Firefox 52.3.0 ESR, Linux amd64.

@timvandermeij
Copy link
Contributor

Closing since the performance problems have been solved and the characters are no longer missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants