I want to use SumatraPDF viewer for TeXnicCenter. I set it up as suggested in different manuals and it works nice when using pdflatex. I used mainly this manual: https://pic-projekte.de/blog/sumatra-pdf-mit-texniccenter/ (it's in German, but you can get the instructions along the pictures)

But my most important file only works with XeLaTeX and Biber. If I set everything up (XeLaTeX instead of pdflatex, biber instead of bibtex), it won't work. After compiling I get the message "[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)] Cannot execute the command"

Do I have to use other settings? If yes, which ones? I couldn't find helpful suggestions yet.

I am using MiKTeX 2.9, TeXnicCenter 2.02 and SumatraPDF v3.1.2 64-bit .

EDIT: I add some (requested) screenshots:

pdflatex - (La)TeX

pdflatex - Viewer The path is here: "C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""

xelatex - (La)TeX

xelatex - Viewer The path is here "C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search "\"C:\Program Files\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""

Thank you!


1 Answer 1


The editor should never use Forward Search with -reuse-instance or -inverse search they are set-up commands not required for forward sync. Only one type of call is needed by SumatraPDF to hand back on DOUBLE CLICK (that's the easy bit).
enter image description here The recommended reliable way to add TexnicCentre archaic command (/ddecmd "[goto('%f', '%l')]") is to add it to SumatraPDF Settings Advanced options as plain text so check it is correctly set for your system as

InverseSearchCmdLine = "C:\Program Files\TeXnicCenter\TeXnicCenter.exe" /ddecmd "[goto('%f', '%l')]"
EnableTeXEnhancements = true

The Forward Search instructs SumatraPDF where to come back to&from this is the hard part the TO could be a PDF or PS or other supported format. Commonly its the MAIN.pdf so that is %bm.pdf and if we use capital B it should work using non windows paths as well as windows ones the line number is easy that's %l (lowercase L) the hard part is choosing where you want to come back to thus is it main or subfile ? lets choose Working current.tex so adding this together it could be

-forward-search %Wc %l %Bm.pdf

So all the formats that compile pdf from TeX such as pdfLaTeX XeLaTeX should use one like this for F5 (Jump to PDF)

-forward-search "%Wc" %l "%Bm.pdf"  

or similar :-) hence the confusion as there are dozens of placeholder combinations

enter image description here

One of the common issues is that TexnicCentre reports it cannot run (execute)SumatraPDF this is down to using the correct system call for the viewer. In this diagram I have simply inserted SumatraPDF.exe, in a perfectly installed system that would not be needed just send only a pdf or postscript name and SumatraPDF would open it. However recent windows makes that more difficult and in order to specify the exact line number we need to call SumatraPDF precisely (NOTE you don't really need to end the line with .exe). In a conventional windows setup SumatraPDF should have been installed to "C:\Program Files\SumatraPDF\SumatraPDF.exe" so that is a good starting point.

Read all about it in the configuration guide here



  • Thanks a lot for this extensive explanation! I tried the configuration of @Kurt (see link) and it works for me. Also, I tried your answer, but I got the error that SumatraPDF.exe couldn't be executed. However, it is working right now. :)
    – Jule
    Jun 18, 2019 at 6:28
  • Okay, thanks. Using the whole path to SumatraPDF.exe works without giving an error! :)
    – Jule
    Jun 19, 2019 at 6:21

You must log in to answer this question.

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