DDE control TeXnicCenter
Asked Answered
P

6

10

I use TeXnicCenter for LaTeX and would like to have the DDE controls working to easily view the pdf versions. Acrobat X seems to have changed the servername and this is breaking things. I tried "AcroViewR10" or "acroviewR10" and other combination, but still it does not work.

As a work around, using command line argument "%bm.pdf" works, but I manually need to close the pdf everytime before recompiling. So, it takes an extra click or so.

Can anyone give some insight to solve the problem either by fixing DDE or how to close the pdf automatically when it is recompiled?

Prolongate answered 14/2, 2011 at 23:50 Comment(2)
Something I needed to do (as well as changing the server) was: In Adobe Reader X, go to Edit>Preferences>General and uncheck "Enable Protected Mode at startup".Cognizable
Should this question be migrated to tex.stackexchange.com? It certainly belongs there and I couldn't find this answer anywhere there already. What I don't know is if it also belongs here.Messmate
A
13

Actually, the answers from Martyn and Adam Nellis solved this problem. Thanks a lot, folks. I am just putting it step by step, so someone else can use it.

Step1: Adobe ReaderX In Adobe Reader X, go to Edit>Preferences>General and uncheck "Enable Protected Mode at startup".

Step2: TeXnicCenter Go to Build->Define Output Profiles-> choose "Latex to PDF" -> Viewer tab

2.1. For "View Project's Output" & "Forward Search"

  • Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • Server: AcroViewR10 Topic: control

2.2. For "Close Document"

  • Command: [DocClose("%bm.pdf")]
  • Server: AcroViewR10 Topic: control (use this option even if you use Adobe Reader 11)
Ajit answered 5/4, 2011 at 4:39 Comment(4)
This looks correct and I have the same, but it does not resolve the issue. But this is the most likely the solution.Prolongate
Worked for me, but of cours for AdobeReader XI you have to use "AcroViewR10" instead of "AcroViewR11"!Brumfield
@Brumfield you mean "AcroViewR11" instead of "AcroViewR10"Amoakuh
In "Close Document", if you have Adobe Reader 11, you do have to type AcroViewR11. I didn't work for me until I tried that.Overtone
I
5

For those using Acrobat X pro, the server should be AcroviewA10 and the excecutable should be Acrobat.exe

Imalda answered 25/1, 2012 at 7:33 Comment(0)
D
5

For the newer version of Adobe [DocClose] doesn't work anymore. So you have to make updates. In texnicCenter hit Alt+F7, go to Viewer TAB and follow the example accordingly (works on Win7 with Adobe11):

in Executable path you have to have something like "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"

View Project's Output >>> Choose "command line argument" and enter "%bm.pdf" in command

Forward Search >>> Choose "command line argument" and enter "%bm.pdf" in command

And finally *THE MOST IMPORTANT OPTION* Close Document Before Running (La)Tex >>> Choose "DDE" and enter "[AppExit]" in command "AcroViewR11" in Server "control" in Topic

Dicrotic answered 17/11, 2013 at 22:58 Comment(2)
@FionaSmith: I added this post just because of users like us... I remember passing hours trying to solve the problems and nothing. After I achieved it I decided to share ;)Dicrotic
Your solution is a "bazooka" since any other tabs in Acrobat Reader are closed too, but it does work! So, upvote. PS With Acrobat Reader 2017 the right server name is now (unsurprisingly) AcroViewR17Silda
A
3

I realise this question is a little old, but I have just been struggling with this problem (not used TeXnicCenter for a wile, so hadn't noticed the problems when upgrading Adobe) and this thread is the only one that solved the problem for me. I had to use a combination of the above answers, though, so I thought I would document what worked for me.

I am using Windows Vista Business edition, TeXnicCenter 1.0, and Adobe Reader 10.0

Go to Build->Define Output Profiles-> choose "Latex => PDF"

1) In the viewer tab, change the executable location to point to

C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe

2) View project's output: Select DDE command and enter

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

3) Forward search: Select DDE command and enter

[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10    Topic: Control

4) Close document before running (La)TeX: Select DDE command and enter

[AppExit]
Server: arcroviewR10    Topic: Control

In particular, it was point 4 that I needed to do, and despite searching a while, this is the only place I have found advice to switch the DDE command to [AppExit] and it worked a treat. Thanks Claudia!

I have not needed to change the Adobe Reader settings at all (i.e. it is still in Protected Mode at Startup).

Aeroscope answered 24/1, 2014 at 10:33 Comment(0)
T
2

My settings are:

  • Path of Executable: C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe

For "View Project's Output" & "Forward Search"

  • Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
  • Server: AcroViewR10
  • Topic: control

For "Close document"

  • Command: [DocClose("%bm.pdf")]
  • Server: AcroViewR10
  • Topic: control

That works for me except for two things:

  1. When Acrobat Reader is closed and I press F5 it will open Acrobat Reader but will not open the document and will bring up an error message. If I close the error message and press F5 a second time (with Acrobat Reader now open) then it will open the document.
  2. When I press F5, and the document opens, Acrobat Reader does not become the top window (the focus stays with TexnicCenter).

So not major problems but just small annoyances.


Edit:

Not sure if it makes a difference but in the windows registry the keys:

  • HKEY_CLASSES_ROOT\acrobat\shell\open\ddeexec\application
  • HKEY_LOCAL_MACHINE\SOFTWARE\Classes\acrobat\shell\open\ddeexec\application

Both have values set to "AcroviewR10" (no quotes).

Trenton answered 14/3, 2011 at 2:9 Comment(0)
B
1

I use Acrobat Pro XI and have the following settings:

Path of Executable:
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 32bit version) and
C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 64bit version)

View Project's Output & Forward Search
"command line argument" and "%bm.pdf"

Close document
"DDE" and enter "[AppExit]" in command "AcroviewA11" in Server "Control" in Topic

Brumfield answered 7/4, 2016 at 13:30 Comment(1)
This answer combines the answers of @Dicrotic and Dave Tompkins and an hour of testing all possible permutations ;)Brumfield

© 2022 - 2024 — McMap. All rights reserved.