I use Foxit Reader as my default PDF viewer for quite some time now. The only thing that bugged me, however, was its exclusive access to the opened PDF files. When working with LaTeX and using Foxit Reader for displaying the compiled PDF files, I had to close the PDF file manually everytime I wanted to recompile the document (which can be quite often).
Today, I found the solution to this problem: Foxit Reader is able to open PDF files without blocking them. With a simple command line argument you can enable this non-blocking mode:
/A nolock=1
For example, if you wanted to open D:\mydocument.pdf
, you would call Foxit Reader like this:
FoxitReader.exe D:\mydocument.pdf /A nolock=1
Attention: For this to work, you need at least version 7 of Foxit Reader.
However, calling Foxit Reader manually like this can be pretty cumbersome. So I decided to make the non-blocking opening the system default. This turns out to be pretty easy. Just fire up regedit.exe
and add the above command line argument to the key HKEY_CLASSES_ROOT\FoxitReader.Document\shell\open\command
. Here’s a complete REG
file for this (you may need to change the path to Foxit Reader):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\FoxitReader.Document\shell\open\command]
@="\"C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\FoxitReader.exe\" \"%1\" /A nolock=1"
Now I’m able to open PDF files directly from Explorer, PowerShell etc. without Foxit Reader blocking them. And Foxit Reader even automatically updates the file, if I change it while it’s open.
I had the same problem of using Latex while viewing the document in foxit reader. Your solution works like a charm, thank you for sharing
Thanks! That helped a lot.
Thank you man, this trick really help me.