If you know the format of any file then it is possible to read it. You can find the PDF specification here. There are also several Java PDF APIs available. Try Google and see if any of them do what you require.
The AccessingFileFormats wiki page lists several libraries that can work with PDF files. If you just want to extract the text it contains then JPedal is probably the best optioption (or PDFTextStream if you have a budget).