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

Font is getting disturbed in Chrome #7462

Closed
gsampath127 opened this issue Jul 1, 2016 · 10 comments
Closed

Font is getting disturbed in Chrome #7462

gsampath127 opened this issue Jul 1, 2016 · 10 comments

Comments

@gsampath127
Copy link

Link to PDF file (or attach file here):
1.http://www.rightprospectus.com/documents/Nuveen/SUM_AllAmericanMunicipalBondFund.pdf
2.http://www.rightprospectus.com/documents/Nuveen/PRO_AllAmericanMunicipalBond.pdf

Configuration:

  • Web browser and its version:Chrome
  • Operating system and its version:Windows 7
  • PDF.js version:1.1.469
  • Is an extension:

Steps to reproduce the problem:

  1. Open First link with Pdf Js Viewer in Chrome
    2.In the same tab Open Second link with Pdf Js Viewer.(Chrome)
    3.We will able to see the disturbed font as in attached Picture.
    4.But if we open the second link for the first time , there is no issue.
    5.A User in our system always navigate to documents in same tab , so we are facing this issue.
    6.Issue is in second link provided above.

What is the expected behavior? (add screenshot)
fondd_nuveen_original

What went wrong? (add screenshot)
fondd_nuveen

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@gsampath127
Copy link
Author

We Tried applying fix by 87762af , provided by pdf js team.

This does not work for us. Can you please provide any suggestions or code changes that we can apply here to solve the issue and please let us know any problem with the pdf.

Thanks in Advance!!!

@timvandermeij
Copy link
Contributor

You are using a very old version of PDF.js. Many font fixes have been applied since. Try to open the file with https://mozilla.github.io/pdf.js/web/viewer.html (Open File button in the toolbar) to see if the problem remains.

@gsampath127
Copy link
Author

Hi, We integrated latest version of PDF.js(v1.4.20), issue still persist. It happens only in chrome when we open below two documents in same tab one after another.
1.http://www.rightprospectus.com/documents/Nuveen/SUM_AllAmericanMunicipalBondFund.pdf
2.http://www.rightprospectus.com/documents/Nuveen/PRO_AllAmericanMunicipalBond.pdf

Could you please verify if something is wrong with above PDF documents related to font settings?

We tried to open these documents using demo URL- https://mozilla.github.io/pdf.js/web/viewer.html it works fine. Demo URL uses open file button in toolbar whereas we pass PDF url in query string. When we use open file button, its working with our old version also.
Do we have any way to open PDF in demo site using query string?

@Rob--W
Copy link
Member

Rob--W commented Jul 5, 2016

FYI, I've also encountered this issue a couple of times in the past month when I was reading papers for research. After opening the PDF Viewer (Chromium 51, Linux), the fonts looked a bit weird (sometimes thin, sometimes doubled like the picture above).

@gsampath127 Can you try the beta version? If that doesn't solve the issue, can you apply the patch at #7347 and see whether it resolves the problem (note: this is just a font issue, I didn't check whether it is related to your test case).

@gsampath127
Copy link
Author

Hi, We tried by integrating with beta version, issue is still present. We also tried to apply the patch at #7347 but it did not work for us.

Please suggest.

@gsampath127
Copy link
Author

Hi, Could you please look into above issue? Please let us know if something is wrong in PDF so that we can get those PDF's corrected.
Thanks.

@gsampath127
Copy link
Author

Hi Team, Could you please look into above issue? or Please let us know if something is wrong in PDF so that we can get those PDF's corrected.

This issue is a kind of work stopper for us and we have tried all options from our side.

Thanks.

@timvandermeij
Copy link
Contributor

I cannot reproduce the issue using Firefox 47.0.1 on Arch Linux with the latest PDF.js development version. I really think this is some kind of regression in Chrome that should be reported upstream if it cannot be reproduced with other browsers.

@gsampath127
Copy link
Author

We have applied fix provided here - #5148

font.loadedName = 'g_font_' + Math.floor(Math.random() * 999).toString() + (fontRefIsDict ?
fontName.replace(/\W/g, '') : fontID);

Its working fine in Chrome now. Please let us know if any changes.

Thanks!

@yurydelendik
Copy link
Contributor

Base on the conversation above, problem occurs for custom solution and reported didn't provide steps to reproduce the issue. Closing as incomplete. The workaround was found at #7462 (comment), however it does not guarantee a correct solution and without steps to reproduce it's impossible to validate/verify it.

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

4 participants