-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such file or directory error #4
Comments
Hello, The only place where something could be wrong is here: https://github.com/blambeau/pdf-toolkit/blob/master/lib/pdf/toolkit/native.rb#L34 What is your environment? Can you send me the value of RUBY_PLATFORM? |
Hello, Please let me know if you need any more details. Regards, On Wed, Jul 30, 2014 at 6:42 AM, Bernard Lambeau [email protected]
|
Ok. Could you try by replacing the line (lib/pdf/toolkit/native.rb:34)
by
If it works on your computer, I'll make the change in the repo, but I can't test it easily, having no windows machine. |
Thanks Bernard. No such file or directory - "pdftotext" This is the code I have: require 'rubygems' require 'pdf/toolkit' begin filename = "C:\Downloads\PrivateCompanyPreview.pdf" my_pdf = PDF::Toolkit.open(filename) text = my_pdf.to_text.read puts text rescue Exception => msg display the system generated error messageputs msg end |
Clearly, the pdftk installation under windows is not the same as in linux.
|
ah i see. So, is there a workaround for this issue? Regards, On Wed, Jul 30, 2014 at 2:38 PM, Bernard Lambeau [email protected]
|
Not that I know. You should check the documentation of pdf toolkit under windows. |
Hello,
I have downloaded the latest version of pdf-toolkit gem for Ruby.
When i try to use PDF::Toolkit.open command, i get the error 'No such file or directory - /dev/null'
I have tried giving the absolute path, relative paths, nothing works.
Can someone please help? I have the code snippet as below.
Regards,
Ramya
require 'rubygems'
require 'pdf/toolkit'
begin
filename = "Test.pdf"
my_pdf = PDF::Toolkit.open(filename)
text = my_pdf.to_text.read
puts text
rescue Exception => msg
display the system generated error message
puts msg
end
The text was updated successfully, but these errors were encountered: