Straight up. I have to use windows @ work but I still require some
guidance.
I'm looking to append some pdfs. Pdftk
(http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) works in the cmd
prompt.
Lets say I have
01_cool.pdf
02_cool.pdf
If I'm in cmd I can type
> pdftk *.pdf cat output combined.pdf
#=> A new file called combined.pdf which is the concatenation of the two
pdfs
I need to be able to run this in ruby because I would like to eventually
append all files that have the same names in two directories and put it
into one final directory. As a test this is the code I came up with.
pdfs = Dir["*.pdf"].sort.join(" ")
`pdftk #{pdfs} cat output combined.pdf`
Which results in an error: "No file or directory -pdftk ["01_cool.pdf",
"02_cool.pdf"] cat output combined.pdf
--
Posted via http://www.ruby-forum.com/.