Update on 2008-01-24:
The “back” feature is no longer needed, at least on Windows Acrobat Reader 8. See: Edit->Preferences->Documents->Restore last view settings when reopening documents
Update on 2007-01-30:
I have patched the source and replaced the zip files so that
pdfclose will be less likely to crash Adobe Reader 8. Thanks to this post. Also, apparently
pdfopen cannot issue a “back” command to Adobe Reader and you need the full version for that feature.
If you are a Windows user and use Acrobat or Adobe Reader(*) to view PDF files, you may have experienced Acrobat locking your PDF file, making it impossible to overwrite. This is a serious problem when previewing your paper in the PDF format because every time before you generate a new PDF, you need to remember closing the old PDF in Acrobat.
Part of my solution to this problem is to open the PDF using
pdfopen --file foo.pdf
This will allow me to close
pdfclose --file foo.pdf
Integrating these two commands into your work-flow is left as an exercise to the reader.
But there is still an important usability problem that these two commands won’t solve. Every time you re-open a PDF, you will not be on the same page when you closed it. Instead, you will be on the first page. How would I to fix this? One solution would be to press Alt-Left after I re-opened the PDF file. This goes back in history and brings me to the last view I was at. But I’ve got something better.
I’ve modified the source code of
pdfopen from TUG to include an extra option
--back to do the obvious thing. So instead of the above, you should open a PDF file by:
pdfopen --file foo.pdf --back
Now the cycle is complete. Phew!
For the record, you can obtain the original
pdfclose at this URL:
P.S. I am also aware that you can use gsview32 to preview PDFs and gsview32 does not lock PDF files. That’s one way to avoid this problem.
(*) Really, it’s called Adobe Reader. I don’t know since when they dropped the middle word.