Acrobat Inter Application Communication

Posted on: Wed, 11/15/2006 - 12:54 By: dae
Tags

Writing a latex document differs much from any other word processing program. It is just like writing a program. I feel much better when there is an IDE for a particular language I am using. Agreed, many can go without IDE. Take Mr. Wood, for example, he always babbling teases me and said that emacs or vi is the best. Well, not for me. Those editors are nice but that is not enough. Though emacs is easily extensible, I don't want to spend my time there. EditPlus is also nice, I used it to write latex for my master thesis but that is also not enough.

So, I search amongst readily available latex editor. WinEdt is my long time favorite since I started my Ph.D. but it is not gratis (finger crossed). And there come many others. Latex Editor (LEd) is a good one, not open source but a freeware. However, the big problem is that, when you use pdflatex and the document is already open, it always complain, when you are compiling, that the document cannot be written. The problem is caused by Acrobat, since it lock the file. WinEdt solves this problem by closing the document in Acrobat before compile. WinEdt do so by a mean of DDE. but LEd can't do the same.

However, LEd support user command (just like edit plus), so, I have to write a program to close a specific document in Acrobat.

Adobe provides SDK for Acrobat and there is a very very easy way to communicate with Acrobat, via DDE.

Just send [DocClose("filename")], to the DDE server of acroview, and the document is closed... However, the document must be manipulable by DDE. If you simply open the document, the document is immanipulable. To rectify this problem, simply send [DocOpen("filename")] and the document will be added to the DDE manipulable list.

That's all.