LaTeX forum ⇒ 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, ...)
User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Re: Problem with Adobe Reader 8.0

Postby Sven » Fri Jan 19, 2007 10:53 am

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:
  1. handle-pdf.cmd open "C:\somedir\my-output.pdf"

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

That should work!
LaTeX Community Administrator
Originator of TeXnicCenter

dmonkey
Posts: 4
Joined: Thu Jan 18, 2007 3:02 pm

Postby dmonkey » Fri Jan 19, 2007 12:58 pm

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

Postby Kris » Fri Jan 19, 2007 1:07 pm

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 Sad

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

Greetings
Kristof

MartinC
Posts: 152
Joined: Wed Jan 17, 2007 10:09 pm

Postby MartinC » Fri Jan 19, 2007 3:47 pm

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.

MartinC
Posts: 152
Joined: Wed Jan 17, 2007 10:09 pm

Postby MartinC » Fri Jan 19, 2007 9:44 pm

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

Postby Sven » Sat Jan 20, 2007 12:28 pm

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.
LaTeX Community Administrator
Originator of TeXnicCenter

roman
Posts: 15
Joined: Mon Jan 15, 2007 7:41 pm

Postby roman » Sat Jan 20, 2007 3:40 pm

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()].

User avatar
Sven
Site Admin
Posts: 100
Joined: Sat Jan 13, 2007 12:52 pm

Postby Sven » Sun Jan 21, 2007 2:55 pm

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.
LaTeX Community Administrator
Originator of TeXnicCenter

User avatar
Kris
Posts: 56
Joined: Sun Jan 14, 2007 4:04 pm

Postby Kris » Mon Jan 22, 2007 2:22 pm

Hi Sven,

verified it Very Happy ... works even after restart Wink

Thanks to roman!

Greetings

Kris

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

Postby emissary » Tue Jan 23, 2007 12:16 pm

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?


Return to “Viewers for PDF, PS, and DVI”

Who is online

Users browsing this forum: No registered users and 2 guests