izuzak / atom-pdf-view

Support for viewing PDF files in Atom.
https://atom.io/packages/pdf-view
MIT License
106 stars 30 forks source link

Images are not rendered properly #137

Open Haydnspass opened 8 years ago

Haydnspass commented 8 years ago

Hey,

I've several problems when it comes to images (or pdf which contains images). They are shown too small and displaced. Any ideas?

izuzak commented 8 years ago

Hi @Haydnspass -- can you share an example PDF where you're seeing this problem (you can add it as an attachment to a comment), and clarify which version of Atom and pdf-view you're using?

Haydnspass commented 8 years ago

Hey,

please find the pdf document attached. I've made a screenshot additionally. Here the image is not displayed at all. I'm using Atom 1.7.2 and pdf-view 0.50.0

Thank you :)

robust_analysis_master.pdf

bildschirmfoto 2016-04-28 um 14 41 33
Haydnspass commented 8 years ago

I have the impression that the problem comes with pdf containing images which were in .jpg format. Because for the same image included as .png in LaTeX it works

izuzak commented 8 years ago

Thanks. I'm seeing this error in console after opening that PDF:

"Refused to load the image 'blob:file%3A///7aef3df7-a52f-447c-af52-3161e98089e4' because it violates the following Content Security Policy directive: "img-src data: *"."

I'm guessing that's related, but I don't have time to dig in and figure out if there's a way to work around this. If someone else wants to take a look and open a pull requests -- I'd be happy to review.

Madh93 commented 8 years ago

Same problem using Atom 1.7.2. However using 1.6.0 and 1.6.2 works fine...

fabianp commented 7 years ago

Similar problem here, with images displaying at different scale that supposed. In my case these are embedded as PDF. I'm using atom 1.10 and latex 0.36

image

fabianp commented 7 years ago

Hitting Control - once solves the problem:

image

but hitting it more than once makes it worse:

image

It's also strange that hitting Control - makes the images bigger instead of smaller.