]> git.lyx.org Git - features.git/commit
pdfview.nsi: new version that fixes bug #9512 and some more
authorUwe Stöhr <uwestoehr@lyx.org>
Thu, 21 May 2015 00:19:13 +0000 (02:19 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Thu, 21 May 2015 00:19:13 +0000 (02:19 +0200)
commit26144ae4dd50af44bbbb67b104dfd4184aa766c6
treee34e6f9464f1f3a29dfc1efaefe08f48602e4d1d
parent2a0b886a5ce875dfa38d1afad8f0aa4b10596917
pdfview.nsi: new version that fixes bug #9512 and some more

The general problem is that Acrobat opens PDF files with write access so that PDF files cannot be modified externally by LyX/LaTeX.

The old pdfview used the programs pdfopen and pdfclose to open and close PDF files in Acrobat and it additionally closed and opened the PDF whenever it was changed (to simulate LyX's update button).

Since Acrobat DC (aka Acrobat 15) it is no longer possible to close PDF files in Acrobat. Due to changes in the Acrobat API also the pdfopen program can no longer be used.
Besides this the approach of updating the PDF whenever it changed was always a hack that often killed Acrobat. The reason is that one cannot immediately update the PDF view if the PDF is changed because depending on the size LaTeX needs up to several seconds to generate the PDF. If the PDF is opened while TeX is still creating is one get error messages from Acrobat Acrobat must be restarted - very annoying. During the years I experimented with a wait time to minimize these problems but of course it can never be solved.

The new pdfview version uses a completely different approach:
- it checks if the PDF is opened by Acrobat by reading the window name. If it is found this program windows will be closed. So Acrobat is not ended and other opened PDF files stay opened.
- to update the PDF view from within LyX one has to press the view button, not the update button. Only this way we know that TeX is ready and the PDF can be opened by Acrobat with write permissions.
development/Win32/pdfview/pdfview.nsi [new file with mode: 0644]