# How to extract specified objects from a pdf?

Is it possible to extract some information from a pdf file? I am interested in extracting the words before the squared brackets and the following word (in the image, for example, I would like to extract A and s, then a and an, and so on...)?

Many thanks for all your suggestions.

• When you Import["mypdf", "Plaintext"], does this text appear? – Carl Lange Oct 2 '19 at 19:55
• yes, the text appears. Unfortunately, my difficulties are mainly on how to extract some specific items from it. – still_learning Oct 2 '19 at 22:22

Given that the formatting of the text seems consistent, it might suffice to partition the text by periods (".") and remove newlines ("\n" and "\r").
text = StringSplit[StringDelete[Import["mypdf.pdf", "Plaintext"], {"\n", "\r"}], "."];
words = Flatten[StringDrop[StringCases[#, ___ ~~ "["], -2] & /@ text]
(The -2 is removing [)