# Problem with TexMaker and Sumatra PDF

When I do quick build with Texmaker, it is also trying to open the output file from desktop and giving

``````error loading C:\Users\UserName\Desktop\pdfname.pdf
``````

error. But it is also opening original file thus producing two output files for same tex file (one with error). I configured Texmaker as mentioned in the following link: Configure forward search with Texmaker + SumatraPDF (I used first and third solutions. Both gave the same error.)

What am I missing?

EDIT:- Now I got the issue. If another pdf file is opened(say 'some.pdf' file on the desktop), then sumatra is trying to open newly built pdf from desktop. That's why I am getting the error.

How to rectify this weird behavior?

-
Welcome to TeX.sx!. Did you see similar symptoms solved at TexMaker + Sumatra PDF Forward search –  texenthusiast Apr 8 '13 at 15:52
Yes I followed the same steps given in above link but still problem is there. I think problem is with configuring with forward-search only. When I don't add forward search, it is working fine. –  Kiran Apr 9 '13 at 7:58
I found out that, we can't use -reuse-instance and -forward-search together because if i use either of them it worked fine. But with both of these, it is giving above error. Looking forward to an answer. –  Kiran Apr 9 '13 at 16:31
add comment

## 1 Answer

Finally, I found the solution by doing a bit of research in the commands. Actually you have to type following command while using sumatra and texmaker in the path to pdf viewer. Here "!" indicates current directory.

``````"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe " -reuse-instance   "!\%.pdf"  -forward-search  #.tex @
``````
-
I didn't use \include command. And i think no need to put double quotes. –  Kiran Apr 10 '13 at 12:32
add comment