Martin DeMello wrote in post #1058550:
> On Thu, Apr 26, 2012 at 1:38 PM, Christopher D. <lists / ruby-forum.com>
> wrote:
>> So I ran your code and it put out the line but then had an error
>> pdfappend.rb:18:in ``': No such file or directory - pdftk 01_cool.pdf
>> 02_cool.pdf cat output combined.pdf (Errno::ENOENT) from
>> pdfappend.rb:18:in '<main>'
>>
>> I also tried putting quotations around the #{cmd} and that run with no
>> errors but did not output my new file
>
> It looks like it isn't finding the pdftk executable. I'm not sure how
> windows does path lookups - try calling it with the full path to pdftk
> (e.g. "c:\program files\pdftk.exe #{pdfs}") instead of just pdftk. You
> will probably need to escape the backslashes too.
>
> martin

Appreciate the follow up.

So the pdftk definitely works but only in the command line. If I write 
out
>pdftk 01_cool.pdf 02_cool.pdf cat output combined.pdf
#=> combined.pdf will be made and it is a combination of the former pdfs

I looked at your suggestion and tried several iterations such as:

puts Dir.pwd
ex = Dir["P:\project\bin\pdftk.exe"]
file = Dir["P:\project\bin\combined.pdf"]

cmd = "#{ex} 01_cool.pdf 02_cool.pdf cat output #{file}"
puts cmd
`#{cmd}`

I get the same error. This is very perplexing to me.. I would enjoy 
hearing any other suggestions

-- 
Posted via http://www.ruby-forum.com/.