4

I use the FoxitReader instead of Acrobat Reader to see the pdf files. I defined it when I installed TeXnicCenter. When a new file is compiled, it does not automatically closes off the old one. So in order to see the new file, I have to manually close the old file in Foxit Reader (click the X). What can I do? Should I change "Close document before running Latex: Do not close"? If so, with what? Related: http://consult.wikidot.com/latex#foxit

The project's options are:

Profile Latex:  
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe  
-interaction=nonstopmode "%pm"  
Bibtex:  
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\bibtex.exe  
"%bm"  
Makeindex:  
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\makeindex.exe  
"%bm"  

Under Viewer:  
Path C:\PROGRAM FILES (X86)\FOXIT SOFTWARE\FOXIT READER\FOXIT READER.EX  
View Project's Output  Command line: "%bm.pdf"  
Close document before running Latex: Do not close 

2 Answers 2

3

I would recommend that you rather use SumatraPDF as a PDF viewer. You do not need to close it before recompiling your document and (very important) it has SyncTex capabilities. That means that you can jump direct from a position in the viewer to the corresponding text in your Latex file and vice versa.

The following setup is from the TeXnicCenter tutorials.


Change the existing profile LaTeX=>PDF or make a copy say, LaTeX=>PDF (Sumatra). Edit the profile. Under the three tabs: (La)Tex, Postprocessor and Viewer make the following settings:

(La)Tex:
Command line arguments to pass to the compiler

-synctex=-1 -interaction=nonstopmode "%Wm"

Postprocessor:
No settings required

Viewer:
Path of executable

"<path>\SumatraPDF.exe" -inverse-search "\"<path>\TEXCNTR.EXE\" /ddecmd \"[goto(’%f’,’%l’)]\""

At View project's output set the radio button to Command line argument

  • Command: "%bm.pdf"

At Forward search set the radiobutton to DDE Command

  • Command: [ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
  • Server: SUMATRA
  • Topic: Control

At Close document before running (La)TeX set the radio button to Do not close.

1
  • This doesn't work for me. Says "I can't write on file 'output.pdf'. Any solutions to this?
    – user41766
    Commented Mar 8, 2014 at 21:35
0

This is a known problem (see for example http://www.teamliquid.net/forum/viewmessage.php?topic_id=170598 )

Some work-around, not perfect but the best available (in Windows 7)

Use the batch file:

TASKKILL /FI "WINDOWTITLE eq %2.pdf*"
START "C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe" %1

Note: Windows 7 does not have the command kill

-A typical file looks like name.pdf-Foxit Reader[name.pdf]
%2 is the second parameter (given by %tm)
eq means equal
so %2.pdf* kills the processes with window title having the %tm extension
the processes can be seen with tasklist

Path of executable "C:\Program Files (x86)\Foxit Software\Foxit Reader\batch.bat"
View project's output
command line
"%bm.pdf" %tm
Forward Search: blank command line
Close document: do not close

And if you have different pdf files use multiple instances in the Foxit Reader tools-->preferences
Different instances have different processes(PID)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .