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

PDF bad rendering depending on zoom level #138

Open gVallverdu opened 8 years ago

gVallverdu commented 8 years ago

Hello As you can see on the figure below, text is not rendered correctly. Depending on the zoom level, the text is correct. I can read it for huge or tiny zoom. Thanks Germain

Atom 1.7.2 pdf-view 0.50.0 OS : Mac OS X 10.11.4

Example for standard zoom

vue1

With a tiny zoom

vue2
izuzak commented 8 years ago

Thanks for opening an issue, @gVallverdu

As you can see on the figure below, text is not rendered correctly. Depending on the zoom level, the text is correct. I can read it for huge or tiny zoom.

Can you share the PDF you took these screenshots from here as an attachment? This sounds very similar to https://github.com/izuzak/atom-pdf-view/issues/109 which was supposed to be fixed. Does this happen for you when you quickly zoom in or zoom out several times? Does this happen every time or only sometimes?

gVallverdu commented 8 years ago

This is the pdf file : ModulesNumeracy.pdf

It happens almost all times. The rate of zoom in or zoom out is not the critical point. If I open a pdf, it opens at a standard zoom level and the output is wrong. I have to zoom in or out to be able to "read" it whatever the rate. The minimum and maximium zoom level for which it works seems to be always the same for all pdfs.

I tried several different pdf files. Does it could be a font issue ? Acutually, in all pdf I have tried, pictures or figures are right but text are wrong. For example, I have a set of latex/tikz pictures where all shapes are right but text is not rendered. This is another pdf for example :

microbatterie_en.pdf

izuzak commented 8 years ago

Thanks for the PDFs. Those two PDFs look fine for me when I open them. Here are screenshots of what I see as soon as I open them:

screen shot 2016-05-03 at 07 54 27 screen shot 2016-05-03 at 07 54 34

I don't see the broken things that are visible in the first screenshot you posted above -- everything looks normal for me. Can you share the PDF for that? As far as I can tell, that's not from either of these two PDFs.

Also, do you have any other Atom packages installed? Can you try on a clean Atom install (no other packages installed and no other customizations), with just this package installed?

gVallverdu commented 8 years ago

Ok, I will try. Is there a way to do that without deleting completely the current working version and settings ?

gVallverdu commented 8 years ago

Hello, I did the following :

  1. I move my .atom folder
  2. I download the last version of atom
  3. I installed pdf-view
  4. I installed my previous packages
  5. I restore my .atom folder with the clean Atom install

And it works. As you said, the pdf files look fine :-). Do you understand ?

izuzak commented 8 years ago

And it works. As you said, the pdf files look fine :-). Do you understand ?

@gVallverdu So, just to make sure I understand -- everything works okay for you now and we can close the issue?

gVallverdu commented 8 years ago

Sorry, maybe I was not clear. When I wrote my comment, yes everything worked okay. But today the bug appears again. I did another test and actually, I obtain a different behavior depending on how I launch atom.

izuzak commented 8 years ago

If I launch atom /usr/local/bin/atom from the Terminal, I obtain the bug with zoom issues.

Can you please post a screenshot which clearly shows the problem for the PDF you provided above? The screenshot which you provided in the original issue was taken from a PDF which you didn't provide, so it's hard for me to figure out what the problem looks like.

So, please provide these three things:

gVallverdu commented 8 years ago

Ok, I will try to do my best.

This is the pdf file used for the test : ModulesNumeracy.pdf

Now I did the following steps :

1 - rename .atom folder to backup configuration

mv .atom atom_save

2 - remove Atom from Application directory 3 - Download Atom 1.7.3 from atom.io 4 - I start Atom from Application menu in Finder. It opens as the first time with welcome message 5 - I installed pdf-view package 6 - I add the project folder of the directory of the above pdf file and open it. It works whatever zoom level, see below :

ok

7 - Now I open atom from the Terminal application.

vallver@iemecpp069 <~>  
--> which atom
/usr/local/bin/atom

gvallver@iemecpp069 <~>  
--> atom

I obtain the bug, see below :

default zoom bad1

small zoom : it looks like ok bad2

big zoom : it looks like ok bad3

8 - I restored my .atom folder and I got the same behavior : a bug if I open from the terminal, no bug if I open from Finder -> Applications

izuzak commented 8 years ago

Thanks for those detailed steps. I just tried following them and was not able to reproduce the problem -- the PDF renders normally for me regardless of whether I start Atom with Finder or from Console, and regardless of which zoom level I'm on.

When the bug manifests -- are there any errors in the Console tab of the DevTools? You can open the DevTools with cmd-alt-i.

gVallverdu commented 8 years ago

There is not error but warnings :

console
izuzak commented 8 years ago

Thanks for checking. Well, since I'm unable to reproduce this it's hard for me to say what might be going on. I'm going to leave this issue open so that someone else might offer advice or a solution.