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

auto-reload on update doesn't not work #213

Open
glglgithub opened this issue Jul 2, 2018 · 12 comments
Open

auto-reload on update doesn't not work #213

glglgithub opened this issue Jul 2, 2018 · 12 comments

Comments

@glglgithub
Copy link

I use auto-pdf-view together with latex tool in atom on win10. When latex file is updated and rebuilt, the pdf file is updated however not reloaded in the pdf-viewer panel. It has to manually close the tab and reopen in order to view the latest file....

@ptitjes
Copy link

ptitjes commented Jul 9, 2018

I confirm this behaviour on Linux. However this might not be due to pdf-view but to the latex plugn or latexmk. Indeed, if you open the result pdf in a file manager (nautilus) then it does not reload automatically after build (where it used to). May it be that the copying from the latex plugin from .build/main.pdf to main.pdf doesn't notify the system for a file change ?

@ptitjes
Copy link

ptitjes commented Jul 9, 2018

OK, my bad. It seems I had not enough inotify watches. I did the following and it fixed my problem:

echo "fs.inotify.max_user_watches=204800" | sudo tee -a /etc/sysctl.d/90-override.conf

@WSDeWitt
Copy link

WSDeWitt commented Aug 7, 2018

I am also not getting the pdf to update after recompiling. I have to close the file and reopen.

@jackbshim
Copy link

I have the exact same issue on two of my Windows 10 machines.

@allefeld
Copy link

Same here on Debian 10

@micahjsmith
Copy link

Same here on macOS Catalina, pdfs reload automatically in external Preview but not in pdf-view.

@allefeld
Copy link

allefeld commented Jan 17, 2020

In the meantime, I made my own PDF viewer package for Atom:

https://atom.io/packages/pdfjs-viewer

It is designed as a drop-in replacement for pdf-view, and supports automatic reloading, as well as a bunch of other features. Feedback welcome.

@micahjsmith
Copy link

micahjsmith commented Jan 17, 2020 via email

@allefeld
Copy link

@micahjsmith glad you like it!

@WSDeWitt
Copy link

@allefeld Looks cool, although I'm finding the same issue on macOS Catalina: pdf refreshes in the Preview app after a new tex build, but does not reload in the pdfjs-viewer interface.

@allefeld
Copy link

@WSDeWitt could you open the developer tools and see whether there are any error messages at the time the PDF is opened, and at the time it should be reloaded?

It can also depend on the way the pdf is recreated. If the file is first deleted, and then created again, file watching fails because it is based on inodes.

In any case, feel free to create an issue on my repository.

@WSDeWitt
Copy link

@allefeld Thanks! Indeed this seems related to the pdf recreation method. I am using SCons for TeX build, which by default deletes targets before rebuilding. This SCons behavior can be prevented with the Precious function. This solves the refresh issue in atom-pdf-view, but causes an error in pdfjs-viewer (I will create an issue on that repo).

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

No branches or pull requests

6 participants