Win32ole & Adobe Acrobat Reader


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)


require ‘pdf/writer’
require ‘win32ole’

pdf =
pdf.select_font “Times-Roman”
pdf.text “Hello, Ruby.”, :font_size => 72, :justification => :center


acrobat =‘AcroExch.App’)
doc =‘AcroExch.PDDoc’)“c:<the_absolute_path_to_the_file>\hello.pdf”)

Philippe L. wrote:

Philippe L.
Attik System

For one thing, don’t your backslashes need to be doubled?

“C:\Program Files\Microsoft Space-Bearing Paths\Are\Evil.pdf”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs