SmartSolution
SmartSolution

Reputation: 2338

read text from PDF opened within Browser

Does anyone know How to access the content of the pdf file using any Java Framework or Javascript or Selenium2 Webdriver, pdf file is displayed within Browser?

I need to verify the content of the PDF file which opened inside Browser, PDF file is located in remote WebServer and there is not direct access for it.

Any suggestion is appreciated.

Thanks.

Upvotes: 0

Views: 1714

Answers (2)

Petr Janeček
Petr Janeček

Reputation: 38414

"PDF file which opened inside Browser" means inside Adobe Reader or similar plugin? I fear you can't control that one through Selenium. The best approach here would be downloading the file (also not trivial, but can be done using Firefox or some Java downloader) and checking the file offline on the disk using i.e. http://pdfbox.apache.org/ as user kundan bora suggested.

Upvotes: 1

kundan bora
kundan bora

Reputation: 3889

You can use java library for PDF Apache PDF-box-

http://pdfbox.apache.org/

Upvotes: 0

Related Questions