From: "M. Edward (Ed) Borasky" Date: 2006-11-06T23:00:23+09:00 Subject: Re: Win32ole & Adobe Acrobat Reader Philippe Lang wrote: > Hi, > > 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? > > Thanks! > > ------------------------------------------ > > require 'pdf/writer' > require 'win32ole' > > pdf = PDF::Writer.new > pdf.select_font "Times-Roman" > pdf.text "Hello, Ruby.", :font_size => 72, :justification => :center > > pdf.save_as("hello.pdf") > > acrobat = WIN32OLE.new('AcroExch.App') > doc = WIN32OLE.new('AcroExch.PDDoc') > doc.open("c:\\hello.pdf") > acrobat.show > > > > --------------- > Philippe Lang > Attik System > For one thing, don't your backslashes need to be doubled? "C:\\Program Files\\Microsoft Space-Bearing Paths\\Are\\Evil.pdf"