GithubHelp home page GithubHelp logo

Comments (6)

izuzak avatar izuzak commented on July 17, 2024

Thanks for the report. Can you share a link to one PDF where you're seeing this?

from atom-pdf-view.

frxstrem avatar frxstrem commented on July 17, 2024

Sure, here:

https://www.dropbox.com/s/txxvgxzu3dk8sg2/pdf-view%20bug%2062.pdf?dl=0

from atom-pdf-view.

izuzak avatar izuzak commented on July 17, 2024

Thanks! I'm having trouble reproducing this, though -- I just reloaded that PDF ~20 times and it never showed the black regions as in the screenshot. Not sure what this might be related to. I just upgraded the pdf.js dependency (the library which is used to render PDFs) and published a new version (see #63). Can you try updating to atom-pdf-view v0.20.0 and see if you can still reproduce?

If you can reproduce after updating, can you try loading the PDF in the pdf.js viewer https://mozilla.github.io/pdf.js/web/viewer.html and see if you can reproduce it there?

from atom-pdf-view.

frxstrem avatar frxstrem commented on July 17, 2024

I suspect it's due to some factor local to my machine. I still get the same result after updating pdf-view and restarting Atom, but I don't get the black regions in the online viewer (using Chrome).

I tried switching themes in Atom, and it seems that the color of the "black" regions depend on the background color of the pane (as shown on the left side below). Switching to a lighter theme also made the black regions lighter:

screenshot light

It seems that for some reason, these regions are rendered as transparent on the canvas, and switching the background color of the canvas in the developer tools confirms that this is what happens.

from atom-pdf-view.

frxstrem avatar frxstrem commented on July 17, 2024

I tried changing the background of the document to green (link) and then opening it in the online pdf.js viewer. It seemed to produce the same regions (just white) as in pdf-view when viewed in Chrome 41 (the version used by Atom), but not after updating to Chrome 42. I assume that there therefore is a bug in pdf.js and not in pdf-view, and that may be fixed as Atom updates to Chrome 42. Until then, the workaround I found involved changing the canvas background color to white (which works most of the time since most documents have a white background):

/* styles/pdf-view.less */
.pdf-view .page-container {
  background-color: white;
}

from atom-pdf-view.

izuzak avatar izuzak commented on July 17, 2024

Thanks for letting me know -- great work on investigating this! πŸ”Ž

An update to Chrome 42 should happen soon, see electron/electron#1424.

from atom-pdf-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.