Hi,
I have been looking around for a while for the following problem but haven't found a solution:
I recently downloaded Sumatra PDF viewer and was working through the setup guide lines (plenty available!!). Thus I create a new build profile in TexnicCenter to get the document to output in Sumatra.
When I build the program (ctrl+F7) I get 0 errors and the PDF is created (I can go to the directory in my computer and open it using Sumatra). Inverse search is working well, I can double click some where on the Sumatra viewer and it links back to the respective location in TeXnicCenter.
The problem I am having is when I press F5 (View), I get the error:
[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
Cannot execute the command.
And i am guessing that's why forward search isn't working either (clicking somewhere on TeXnicCenter to display that section in Sumatra).
Below are my settings in the viewer tab in the Build properties:
1. Path of executable
C:\Program Files\SumatraPDFF\SumatraPDF.exe -inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]'\""
2. View project's output
select: command line argument
comman: "%bm.pdf"
3. Forward Search
select: DDE command
Command: [ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
server: sumatra
topic: control
4. close document before running {La}TeX
select: Do not close
Note: I have also tried the following combinations for path of executable:
1. "C:\Program Files\SumatraPDFF\SumatraPDF.exe -inverse-search" "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]'\""
2. "C:\Program Files\SumatraPDFF\SumatraPDF.exe" -inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]'\""
and none of them worked
Please help! also let me know if I can provide any further information to help covey my problem better
Also i am using version 1.0 TeXnicCenter and version 1.5.1 Sumatra PDF
General ⇒ Sumatra PDF forward search error
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Sumatra PDF forward search error
The path to the viewer seems not to be correct.
It should read SumatraPDF and not SumatraPDFF.
Best regards and welcome to the board
Thorsten
Code: Select all
"C:\Program Files\SumatraPDFF\SumatraPDF.exe" -inverse-search "\"C:\Program Files\TeXnicCenter\TEXCNTR.EXE\" /ddecmd \"[goto('%f','%l')]'\""
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 3
- Joined: Sat May 28, 2011 9:54 am
Re: Sumatra PDF forward search error
haha! thanks, i feel stupid!
Anyways, not getting the same error now but something much worse.
In texnic center I select build, it makes the pdf and then i press F5 (view) which opens up Sumatra pdf viewer in its home screen, (yellow background with links to different things).
At this stage the actual pdf doesnt open up and TexnicCenter freezes (have to close the program). Once i press the view button and texnic freezes, if i close the sumatra window and wait 30 secs, texnic unfreezes and the same error as before comes up:
[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
Cannot execute the command.
The inverse search still works if thats meant to mean something.
Not really sure what other information i can provide but let me know
Anyways, not getting the same error now but something much worse.
In texnic center I select build, it makes the pdf and then i press F5 (view) which opens up Sumatra pdf viewer in its home screen, (yellow background with links to different things).
At this stage the actual pdf doesnt open up and TexnicCenter freezes (have to close the program). Once i press the view button and texnic freezes, if i close the sumatra window and wait 30 secs, texnic unfreezes and the same error as before comes up:
[ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
Cannot execute the command.
The inverse search still works if thats meant to mean something.
Not really sure what other information i can provide but let me know
Re: Sumatra PDF forward search error
Try to set "View Project Output" as DDE and set the command as:
[Open("%bm.pdf",0,1,1)][ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
[Open("%bm.pdf",0,1,1)][ForwardSearch("%bm.pdf","%Wc",%l,0,0,1)]
-
- Posts: 3
- Joined: Sat May 28, 2011 9:54 am
Re: Sumatra PDF forward search error
tried to implement what you proposed there, but for some reason I keep getting new problems. Now the texniccenter just crashes if I try open a Tex file (either from within texniccenter or from outside). I then re-installed TexnicCenter, and this problem seems to be fixed.
Now that is fixed, i applied the change you recommended to the view projects output DDE command and yay, it successfully opens up Sumatra with the appropriate pdf and forward search works well. Thanks a lot guys!
Now that is fixed, i applied the change you recommended to the view projects output DDE command and yay, it successfully opens up Sumatra with the appropriate pdf and forward search works well. Thanks a lot guys!