no such file to load -- pdf-reader exception while Reading the value from PDF

31 views
Skip to first unread message

Ramakrishnan Rajendran

unread,
Jul 26, 2017, 9:28:38 AM7/26/17
to PDF::Reader
Hi,

I'm getting the below exception while Reading the value from PDF,

Code:

#{{{ Marathon
require_fixture 'default'

require 'rubygems'

require 'pdf-reader'

#}}} Marathon

severity('normal')

def test

      reader = PDF::Reader.new("D:\\Ramki\\pdf-sample.pdf")

      puts reader.pdf_version

      reader.pages.each do |page|

      puts page.text

      end

 end      



Exception:

net.sourceforge.marathon.runtime.api.ScriptException: no such file to load -- pdf-reader
at net.sourceforge.marathon.ruby.RubyScript.loadScript(RubyScript.java:168)
at net.sourceforge.marathon.ruby.RubyScript.<init>(RubyScript.java:133)
at net.sourceforge.marathon.ruby.RubyScriptModel.createScript(RubyScriptModel.java:387)
at net.sourceforge.marathon.runtime.WebDriverRuntime.createScript(WebDriverRuntime.java:298)
at net.sourceforge.marathon.display.Display.runTest(Display.java:182)
at net.sourceforge.marathon.display.Display.play(Display.java:154)
at net.sourceforge.marathon.display.DisplayWindow.onPlay(DisplayWindow.java:2785)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.marathon.display.ActionInjector$1.handle(ActionInjector.java:75)
at net.sourceforge.marathon.display.ActionInjector$1.handle(ActionInjector.java:70)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Node.fireEvent(Unknown Source)
at javafx.scene.control.Button.fire(Unknown Source)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.notifyMouse(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- pdf-reader
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
at RUBY.<main>(D:\Ramki\Projects01\TestCases\PDFRead.rb:6)
 
Thanks,
Ramki

James Healy

unread,
Jul 26, 2017, 9:30:09 AM7/26/17
to pdf-r...@googlegroups.com
Hi,

I'm not really familiar with jruby or marathon, so I'm not really sure
what the issue might be.

It's highly likely this is an issue with your local environment and
not the pdf-readr gem.

James

On 26 July 2017 at 23:23, Ramakrishnan Rajendran
> --
> You received this message because you are subscribed to the Google Groups
> "PDF::Reader" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pdf-reader+...@googlegroups.com.
> To post to this group, send email to pdf-r...@googlegroups.com.
> Visit this group at https://groups.google.com/group/pdf-reader.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages