This is the strangest issue I’ve ever seen.
I’m using Docsplit to split a multi-page pdf into a bunch of single-page Jpegs. When I use the command line input:
docsplit images scan.pdf --format jpg
Everything works fine. However, in my Ruby script, inputting:
path = "<path_to>/scan.pdf"
Docsplit.extract_images(path, :format => [:jpg])
Does absolutely nothing. It’s like Ruby isn’t even reading my code. Any pointers?
UPDATE:
This just gets weirder and weirder. Looking at the root directory, I’ve noticed that all of the files end up being split and sent there! It is reading my code, but has the strangest ideas of where to put the files.
Now the NEXT question is, is there a way to get them to extract to a location? I could just use the FileUtils.mv command to place them properly, but that would be a massive waste of time and resources.
I mean, it’s hard to tell without you giving us the real path. But if you want to put all the files in a certain folder, you can always set the path like so:
"#{RAILS_ROOT}/pdf/scan.pdf"