Ask Your Question

open pdf in linux with help of base-macro

asked 2017-08-17 16:02:47 +0200

Albert Oldhand gravatar image

In WIndows I use this:

dim oSys as object dim path as variant path = "C:file.pdf" (for example) oSys = CreateUnoService("") oSys.execute(path, "", 0)

to open a PDF (and Windows finds some installed pdf-reader).

In Linux this does not work. On a command-line "gnome-open file.pdf" works fine. Evince is the pdf-reader here. But how do I "wrap" this in a macro, instead of the command-line?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-08-17 17:28:21 +0200

Ratslinger gravatar image

This should work:

Shell "evince /home/YOUR_DIRECTORY/file.pdf"

I believe that is the correct spelling of your document viewer.

edit flag offensive delete link more

answered 2017-08-17 19:22:25 +0200

Albert Oldhand gravatar image

Works very well. Thank you so much!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-17 16:02:47 +0200

Seen: 175 times

Last updated: Aug 17 '17