Magpie
Magpie

Reputation: 627

Is it possible to read text from a pdf using java FileReader or an alternative for java?

I am wanting to make a simple word counter for my latex documents so that I can double check my word count is accurate. More generally it is useful to discover whether java can interpret text from pdf files anyway. A google on it brought nothing up so I am thinking maybe not? If not, why?

Upvotes: 0

Views: 1288

Answers (1)

paulsm4
paulsm4

Reputation: 121849

You can't read text from a .pdf without a PDF file reader. Here are a couple of Java .pdf libraries:

See also this link, for an example of Java text extraction with PDF Box:

Upvotes: 4

Related Questions