Skip to content

Instantly share code, notes, and snippets.

@huynguyen
Created June 8, 2011 22:58
Show Gist options
  • Save huynguyen/1015655 to your computer and use it in GitHub Desktop.
Save huynguyen/1015655 to your computer and use it in GitHub Desktop.
rails console
ree-1.8.7-2011.03 :024 > hb788.document.path
=> "/home/hnguyen/github/opengovernment/public/system/bill_documents/000/021/611/original/streamdocument.asp"
ree-1.8.7-2011.03 :025 > Docsplit.extract_text(hb788.document.path, :ocr => false, :pages => 'all', :output => 'public/')
Docsplit::ExtractionFailed: Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: could not load document: streamdocument.asp
at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:101)
at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:62)
at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit.rb:88:in `run'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit.rb:60:in `extract_pdf'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit.rb:57:in `each'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit.rb:57:in `extract_pdf'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit/transparent_pdfs.rb:16:in `ensure_pdfs'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit/transparent_pdfs.rb:10:in `map'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit/transparent_pdfs.rb:10:in `ensure_pdfs'
from /home/hnguyen/.rvm/gems/ree-1.8.7-2011.03@og/gems/docsplit-0.5.1/lib/docsplit.rb:44:in `extract_text'
from (irb):25
from :0
ree-1.8.7-2011.03 :026 >
@huynguyen
Copy link
Author

hnguyen@hnguyen:~/github/opengovernment/public/system/bill_documents/000/021/611/original$ docsplit text /home/hnguyen/github/opengovernment/public/system/bill_documents/000/021/611/original/streamdocument.asp --pages all
Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: could not load document: streamdocument.asp
at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:101)
at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:62)
at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment