Viewers for PDF, PS, and DVIProblem with Adobe Reader 8.0

Information and discussion about output viewers related to LaTeX (e.g. Adobe Reader, Ghostview, YAP, ...)
Locked
User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Problem with Adobe Reader 8.0

Post by Sven »

Sven wrote: Hi Martin, I don't know anything about "pdfopen" and "pdfclose", but if these are simple command line tools, you can make TXC to call them instead of executing a DDE command. Simply do the following:
[...]

I have to correct myself: The above does not work. What you can enter in "Command line argument" edit box are not whole programs to be executed, but only special command line parameters to the executable specified with the "Path of executable" edit box at the top of the "Viewer" page. When TXC is about to recreate output it will execute the executable with the specified command line arguments to close the document.

If you really do have special command line tools like "pdfopen" and "pdfclose" a workaround using a script file (i.e. a Windows batch file) should work.

Example:
  • You create a batch file called "handle-pdf.cmd" which accepts two parameters: The first parameter has to be one of the two strings "open" or "close". The second parameter has to be the path of the PDF-file to be opened or closed. Depending on the first parameter, your script has to decide whether it should call your "pdfopen" or your "pdfclose" tool.
  • On the viewer page in TXC you specify the path to your batch file as the executable (top of the page).
  • On the viewer page in TXC enable the "Command line argument" option for the open and close command.
  • For the open command you specify the following command line argument: open "%bm.pdf"
  • For the close command you specify the following command line argument: close "%bm.pdf"
When trying to open a PDF-file, TXC will now execute the following command:

Code: Select all

handle-pdf.cmd open "C:\somedir\my-output.pdf"
When trying to close a PDF-file it will call the following instead:

Code: Select all

handle-pdf.cmd close "C:\somedir\my-output.pdf"
That should work!
Last edited by Sven on Fri Jan 19, 2007 10:53 am, edited 1 time in total.
LaTeX Community Administrator
Originator of TeXnicCenter

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
dmonkey
Posts: 4
Joined: Thu Jan 18, 2007 3:02 pm

Re: Problem with Adobe Reader 8.0

Post by dmonkey »

Hi,

Unfortunately the programs pdfopen and pdfclose use the DDE interface to open and close .pdf documents, so these will fail in the same way.
User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Problem with Adobe Reader 8.0

Post by Kris »

Hi All!

There seems to be a problem, if one has installed the 'new' 8.0 Reader
over the 'old' 7.0 Reader. This works for me to remove the problem:

> Uninstall all reader versions (8.0 and 7.0)
> cleaning the adobe reader directory (delete all reader-connected stuff)
> clean install of reader 8.0 (freshly downloaded from adobe)

After this procedure Adobe Reader 8.0 works like a charm


Sorry, after restart of Win XP error happened again :(

...I think, downgrading to 7.0 and waiting for an update of 8.0 seems
to be the only solution...

Greetings
Kristof
Last edited by Kris on Fri Jan 19, 2007 1:07 pm, edited 1 time in total.
MartinC
Posts: 153
Joined: Wed Jan 17, 2007 10:09 pm

Problem with Adobe Reader 8.0

Post by MartinC »

If you really do have special command line tools like "pdfopen" and "pdfclose" a workaround using a script file (i.e. a Windows batch file) should work.

Example:


* You create a batch file called "handle-pdf.cmd" which accepts two parameters: The first parameter has to be one of the two strings "open" or "close". The second parameter has to be the path of the PDF-file to be opened or closed. Depending on the first parameter, your script has to decide whether it should call your "pdfopen" or your "pdfclose" tool.
* On the viewer page in TXC you specify the path to your batch file as the executable (top of the page).
* On the viewer page in TXC enable the "Command line argument" option for the open and close command.
* For the open command you specify the following command line argument: open "%bm.pdf"
* For the close command you specify the following command line argument: close "%bm.pdf"



When trying to open a PDF-file, TXC will now execute the following command:
Code:

handle-pdf.cmd open "C:\somedir\my-output.pdf"

When trying to close a PDF-file it will call the following instead:
Code:

handle-pdf.cmd close "C:\somedir\my-output.pdf"

That should work!


That was a good idea but unfortunately it also crashes Reader as someone else said.

Thanks anyway!

Martin.
Last edited by MartinC on Fri Jan 19, 2007 3:47 pm, edited 1 time in total.
MartinC
Posts: 153
Joined: Wed Jan 17, 2007 10:09 pm

Re: Problem with Adobe Reader 8.0

Post by MartinC »

I have seen that WinEdt has a workaround for that problem.
User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Problem with Adobe Reader 8.0

Post by Sven »

MartinC wrote: I have seen that WinEdt has a workaround for that problem.

Do you know how this workaround works? Maybe we could implement the same for TXC.
Last edited by Sven on Sat Jan 20, 2007 12:28 pm, edited 1 time in total.
LaTeX Community Administrator
Originator of TeXnicCenter
roman
Posts: 15
Joined: Mon Jan 15, 2007 7:41 pm

Problem with Adobe Reader 8.0

Post by roman »

Sven wrote: Do you know how this workaround works? Maybe we could implement the same for TXC.


I suppose the WinEdt workaround is just opening documents using the [FileOpen(...)] command instead of the combination [DocOpen(...)][FileOpen(...)]. And then they're closing all the documents using [CloseAllDocs()].
Last edited by roman on Sat Jan 20, 2007 3:40 pm, edited 1 time in total.
User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Problem with Adobe Reader 8.0

Post by Sven »

roman wrote: I suppose the WinEdt workaround is just opening documents using the [FileOpen(...)] command instead of the combination [DocOpen(...)][FileOpen(...)]. And then they're closing all the documents using [CloseAllDocs()].

Could someone please verify this? Simply do the following:
  • Choose menu entry "Output > Define Output Profiles..."
  • Select the PDF-profile on the left ("LaTeX => PDF" by default)
  • Select the "Viewer" tab on the right
  • Change the DDE commands as mentioned above.
Last edited by Sven on Sun Jan 21, 2007 2:55 pm, edited 1 time in total.
LaTeX Community Administrator
Originator of TeXnicCenter
User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Re: Problem with Adobe Reader 8.0

Post by Kris »

Hi Sven,

verified it :D ... works even after restart ;)

Thanks to roman!

Greetings

Kris
emissary
Posts: 1
Joined: Tue Jan 23, 2007 12:05 pm

Problem with Adobe Reader 8.0

Post by emissary »

roman wrote: [...] And then they're closing all the documents using [CloseAllDocs()].


This works but is no real solution to the problem. What if you're working on more than one PDF Document and you do not want to close them all?
Last edited by emissary on Tue Jan 23, 2007 12:16 pm, edited 1 time in total.
Locked