Created attachment 84045 [details]
image of the error message
Steps to reproduce:
1. open a document
2. start dialog to export to pdf
3. choose "Show pdf-document after export" (in my german version "PDF-Dokument nach Export anzeigen"
4. click export
Each _first_ time I try to shown an exported pdf-document I get an error message that the document to show doesn't exist. If I continue my work and do a second export there is no problem to start FoxitReader (in my case).
It should work at the first time and only at the second time.
Operating System: Windows XP
Version: 220.127.116.11 release
I do not reproduce under Linux (Ubuntu 12.04) with vanilla version 4.1.0.
Best regards. JBF
Reproducible under Windows 7 (32-bit) with LO 18.104.22.168, when exporting to a new pdf file (not overwriting an existing one).
I confirm this for
View PDF after Export
(Sorry for the earlier imcomplete comment.)
I confirm this for 22.214.171.124 on Windows 7 Home Premium 64-bit.
Suspected cause: The command to launch the file happens before the PDF is created.
Suggested solution: Send the command to launch the file only after the PDF is created.
The behaviour/bug still exists in
Build ID: 40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38.
*** Bug 70957 has been marked as a duplicate of this bug. ***
Indeed, LO calls PDF viewer before the file is actually created. It's even worse - LO first creates the pdf as a temp file, then it copies it to a second temp file (and then attempts to open the file with the final path - which is still not created) and only afterwards copies it to the final path. I thinks that it doesn't make trouble on Linux, as launching the PDF viewer takes time, so LO has a chance to write the file. But on Windows the ShellExecute* function fails when the file doesn't exist, and it's not starting the PDF viewer at all.
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":
fdo#68099 Move pdf viewer call to GUI related code
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
*** Bug 74063 has been marked as a duplicate of this bug. ***
*** Bug 74767 has been marked as a duplicate of this bug. ***
Thanks for the fix!
thank you for fixing this little bug. Now it works like expected.
*** Bug 78571 has been marked as a duplicate of this bug. ***