12 Replies Latest reply on Aug 21, 2012 3:49 PM by James Quirk

    Wishlist: Refresh a loaded file

    Level 1
      Hi, I have a problem with AR8.1.1 that did not exist in the previous version. I can not make AR realod a file that is already loaded.<br /><br />I need this function because I use AR to view documents typeset with LaTeX. With LaTeX a pdf is generated from markup code. When the compilation finishes I launch acroread on the result with a helper app [1] that does not stay attached to the shell. With AR7 I could resuse the command while the file was loaded and AR would reload the PDF document, This does not work anymore.<br /><br />It would be helpful if AR would reload a file if it has been passed as an argument but it was already loaded.<br /><br />acroread file.pdf<br /><load the file><br />acroread file.pdf<br /><reload/refresh the file><br /><br />Of course it would be essential to keep the view at the very same position in the file and not jump to the beginning.<br /><br />Please consider this wish. I may not be a paying customer for applications, but I spent a lot of money for Adobe fonts in the past.<br /><br />Thanks,<br />Tobias<br /><br />[1] http://www.ctan.org/tex-archive/support/xpdfopen/
        • 1. Re: Wishlist: Refresh a loaded file
          Level 1
          Hi Tobias<br /><br />I assume you are using pdfopen.c for the simulation of reload. You are passing keystroke ctrl+W to close the PDF and keystroke Alt+Left(previous view) to open the pdf in case acroread is running, and fork acroread otherwise, which works almost like reload for you. <br /> <br />If you see the latest version of Adobe Reader, "Previous view" is disabled if you do not have an open document. This behavior, namely opening a previously closed document when "previous view" was chosen, was a bug in version 7.0. This has been fixed in the 8.1.1. Since your code uses this particular shortcut to open the document, it is not working. <br /><br />Also, in the earlier version (7.0), the title bar used to display [Adobe Reader - <file name>]" and version 8.0 displays " [<File name> - Adobe Reader]", so your program is not able to grab the acroread window and close the document. <br /><br />What you can do is replace the following lines of code in pdfopen.c<br /><br /># define READERWINPREFIX " - Adobe Reader " with <br /># define READERWINPREFIX " Adobe Reader - "<br /><br />strcpy(winname,basefile);<br />strcpy(winname+strlen(basefile)),READERWINPREFIX); with<br /> <br />strcpy(winname,READERWINPREFIX);<br />strcpy(winname+strlen(READERWINPREFIX)),basefile);<br /><br />The code "forking" acroread should be made unconditional for reader 8.1.1 since calling acroread <filename> when an instance of acroread is running already would simply open up the document, which is what you want.<br /><br />I do agree that having a command line argument in acroread itself that reloads a document would be helpful. We'll try to provide this feature in the next release.<br /><br />Hope that helped,<br />Sanika
          • 2. Re: Wishlist: Refresh a loaded file
            Level 1
            Hi, I discovered the window title difference yesterday too, and notified the author about it. A fix that works for AR5, 7, and 8 is imminent to appear on CTAN.

            I don’t understand why it works but it does. The sending of Alt+Left to the window seems to do its job. But the fact that acroread does not stay attached anymore is interesting. I mentioned this to T. Hoekwater.

            Of course an integrated function would be appreciated! Having to hunt down a tool for this simple function, and to compile it, is not so userfriendly.


            • 3. Re: Wishlist: Refresh a loaded file
              Level 1
              Okay, so we have determined why it still mostly works on my system.

              "My guess is that this is because there is a small period between
              closing the file and the actual unmapping of the window where the
              window actually still knows what to do. If you are lucky, the
              alt-left is sent just at the right moment ..."

              It seems that my computer is more sluggish than Mr Hoekwater’s and with my document the Alt-Left shortcut is registered. But sometimes I get a BadWindow error, which is likely due to the reason you explained above.

              So, what we really would need here is to have a --reload command-line switch that closes and reopens the file while sticking to the current viewport.


              • 4. Re: Wishlist: Refresh a loaded file
                Level 1
                Your wish is 'your command'! :-) (Pun intended). We've put this through the process and hopefully should be able to address this in the next major release.

                Thanks for your feedback.

                • 5. Re: Wishlist: Refresh a loaded file
                  What's the difference between Microsoft and Adobe?

                  Sanika provides the answer:

                  ]This behavior, namely opening a previously closed document when "previous view" was chosen, was a bug in version 7.0. This has been FIXED in the 8.1.1. (capitalization mine)

                  In other words, instead of "it's not a bug it's a feature" with Adobe we have "it's not a feature, it's a bug".

                  -Mike O'Connor
                  • 6. Re: Wishlist: Refresh a loaded file

                    I second Tobias on the -reload command-line switch: that would be so soooo useful!

                    Thank you!

                    • 7. Re: Wishlist: Refresh a loaded file
                      Hi Virai:

                      Let me add my begging request to this one, too.

                      However, I think something even simpler would achieve even more: just add the ability to type CTRL-R inside acroread to execute "reload document". If the acroread user looks at a pdf document, hitting this ctrl-R key seems easy and quick. (I would prefer it if I could map it to any key, but ctrl-R seems reasonable. personally, I would use a simple 'r'.)

                      this is not to say that the original request is bad---I would love command line control, too.

                      Incidentally, xpdf checks whether files have changed in between page changes. If it has, it reloads the new file automatically. This is nice because I can use mouse-scroll up followed by down, and see the revised document.

                      [PS: your anti-aliased display quality is simply fantastic.]

                      • 8. Re: Wishlist: Refresh a loaded file
                        Level 1

                        We've recorded this request and your suggestions in our database for the next release.

                        Thanks for the feedback! Please keep the requests coming.

                        • 9. Re: Wishlist: Refresh a loaded file
                          Level 1
                          Hi Viraj,
                          just to have a rough estimate. What do you mean with next release? The 9.0, 8.x or an 8.1.x?
                          • 10. Re: Wishlist: Refresh a loaded file

                            I am a university professor and I think Ivo's CTRL-R suggestion would be extremely useful. There exists a large user base of academics, researchers and engineers that use LaTeX to create PDF documents and that would greatly benefit from this feature. The editing iterations looks like this: edit the tex source, recompile using pdflatex, view the new PDF. As of today, it is necessary to manually reload the PDF each time, which is tedious. A simple CTRL-R shortcut to reload the PDF would save everybody a lot of time.


                            As of September 2010, this feature has not been implemented (I have the latest version, Adobe Reader 9.3.4). Adobe, would you mind helping the research community by implementing this feature ? Thank you for your consideration.

                            • 11. Re: Wishlist: Refresh a loaded file
                              Victor Eijkhout

                              It's the lack of this feature that finally made me abandon Adobe reader. I now use Apple's Preview for all my pdf viewing (and even annotating) and I couldn't be happier. I have no idea who the intended user of Adobe Reader is, but it certainly isn't academics who write and revise papers.

                              • 12. Re: Wishlist: Refresh a loaded file
                                James Quirk Level 1



                                The refresh feature is present in the latest version of Linux AR:

                                just type Ctrl-R. The real problem, however, is that Linux AR

                                has been end-of-lined i.e. killed off. At least that was the

                                story I was given  when I pressed the matter last year.