Reading a PDF using pdf-reader gem

时间:2016-04-15 15:19:41

标签: ruby selenium-webdriver pdf-reader

I have just started working on Selenium automation using Ruby. I have a requirement to read a PDF contents and compare it with my application. For that i am making use of the pdf-reader gem.

reader.pages.each do |page|
    str=page.text
    puts"#{str}"
end

'str' displays the entire text in the PDF. However, i see that some of the words are overlapped by other words.Overlapped words are not displayed in the console at all. Is there any way to display the entire text?

Thanks

0 个答案:

没有答案