Skip to content
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 @ rb_sysopen - example.doc (Errno::ENOENT) #115

Open
jhonc33 opened this issue Aug 29, 2014 · 3 comments
Open

Comments

@jhonc33
Copy link

jhonc33 commented Aug 29, 2014

Hi, i'm trying to extract images from a Microsoft Office Word document and return this error:

/home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:22:in `initialize': No such file or directory @ rb_sysopen - example.doc (Errno::ENOENT)
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:22:in `open'
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:22:in `is_pdf?'
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:11:in `block in ensure_pdfs'
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:10:in `map'
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit/transparent_pdfs.rb:10:in `ensure_pdfs'
from /home/deploy/.rvm/gems/ruby-2.1.2/gems/docsplit-0.7.5/lib/docsplit.rb:50:in `extract_images'
from test.rb:4:in `<main>'

This is the script:

require "docsplit"
Docsplit.extract_images('example.doc', :size => '1000x', :format => [:png, :jpg])

I'm using Centos 6 with all libraries installed, on Mac Os X works great on the same way.
If i try to convert a pdf works great, only fail with office documents.

Any ideas?

Thanks,

@jhonc33
Copy link
Author

jhonc33 commented Aug 29, 2014

This is the line 22 on transparent_pdfs:

File.extname(doc).downcase == '.pdf' || File.open(doc, 'rb', &:readline) =~ /\A\%PDF-\d+(\.\d+)?/

Any suggestion?

@crusadergo
Copy link

up

1 similar comment
@thanhtoan1196
Copy link

up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants