Extract text from pdf file using javascript

Coccinelle picture Coccinelle · Jul 2, 2013 · Viewed 68.9k times · Source

I want to extract text from pdf file using only Javascript in the client side without using the server. I've already found a javascript code in the following link: extract text from pdf in Javascript

and then in

http://hublog.hubmed.org/archives/001948.html

and in:

https://github.com/hubgit/hubgit.github.com/tree/master/2011/11/pdftotext

1) I want please to know what are the files which are necessary for these extraction from the previous ones. 2) I don't know exactly how to adapt these codes in an application, not in the web.

Any answer is welcome. Thank you.

Answer

Allanon picture Allanon · Sep 2, 2013

here is a nice example of how to use pdf.js for extracting the text: http://git.macropus.org/2011/11/pdftotext/example/

of course you have to remove a lot of code for your purpose, but it should do it