From: Isaac Martin on
Raimon Fs wrote:
> Hello,
>
> I have some simple code that works perfectly from irb and from RoR, but
> when I try to run it from TextMate (command R) I'm getting always the
> error:
>
> PDF::Toolkit::ExecutionError: Error invoking PDFTK
>
> require "rubygems"
> require 'pdf/toolkit'
> require "ActiveSupport"
>
> ...
> my_pdf = PDF::Toolkit.open(absolute_path_filename)
> ...
>
>
> Any idea of what I'm missing ?
>
> thanks,
>
> r.

A year later and still no resolution is posted?

I am having the same problem as those above. I am using winxp, ruby 1.91
and pdftoolkit 0.49

Just like the above, if I type the code into irb it works just fine. If
I run it in an IDE(I use netbeans) then it returns the following error:
C:/Ruby19/lib/ruby/gems/1.9.1/gems/pdf-toolkit-0.49/lib/pdf/toolkit.rb:556:in
`read_data': Error invoking PDFTK (PDF::Toolkit::ExecutionError)
from
C:/Ruby19/lib/ruby/gems/1.9.1/gems/pdf-toolkit-0.49/lib/pdf/toolkit.rb:279:in
`reload'
from
C:/Ruby19/lib/ruby/gems/1.9.1/gems/pdf-toolkit-0.49/lib/pdf/toolkit.rb:227:in
`open'
from H:/NetBeansProjects/Beeprocessoradvanced/lib/main.rb:12:in
`<main>'


Someone PLEASE give me an idea of how to resolve this problem. The worst
part is this code is part of a program that worked only a week ago. I
don't know what changed but I went back to run the program and got this
error.
Code:
require 'pdf/toolkit'
require 'pp'

outcounter = 0
htmlcounter = 0
inputarray = []
outputarray = []
puts "0"
my_pdf = PDF::Toolkit.open('c:\process\b')
puts "1"

The above code returns the error on the line "my_pdf =
PDF::Toolkit.open('c:\process\b')" just after it outputs "0".
--
Posted via http://www.ruby-forum.com/.