Win32ole & Adobe Acrobat Reader

Philippe Lang wrote:

Jeff wrote:

Philippe Lang wrote:
I'm trying to launch the opening of a PDF document from within
ruby, under Windows XP. Adobe Acrobat shows up, but no document
appears. Does anyone see the error, or maybe has another better
(cross-platform) method?

Not cross-platform, but try this:

filename = "myfile.pdf"

`start #{filename}`

If it's hard to see in your browser, I'm using the "backtick"
not the apostrophe, which will induce a system call. I'm assuming
Acrobat is installed as your handler for .pdf files.

Jeff
softiesonrails.com

Works great, thanks a lot! I'll keep on trying the OLE way of
doing things: printing in the background could be useful too.

Here we are:

acrobat = WIN32OLE.new('AcroExch.App')
doc = WIN32OLE.new('AcroExch.AVDoc')
acrobat.show
doc.open("c:\\Program Files\\Microsoft Space-Bearing Paths\\Are\\Evil.pdf", "ok")
#doc.printpagesex(0, 0, false, true, true, false, true, true, true)
acrobat.exit

In order to discover the OLE Automation interfaces, I recommend this ruby program:

http://homepage1.nifty.com/markey/ruby/win32ole/index_e.html

Does anyone know how to retreive and change the default printer maybe?

ยทยทยท

---------------
Philippe Lang
Attik System