How do you create an image from the pdf or excel or winword files?

I'd like to show on the screen frames/thumbnails of different documents saved in archive in ASD (pdf, xls, doc, txt).
Is there possibility to create a small jpg image of each document?

There exist Windows programs to extract thumbs from a Windows thumbs.db file, but that would work only for pre-existing files.

I need to do all elaborations automatically and on android smartphone.
I'm trying to show a document via external apps (using activity starter) and than making a screenshot from my app working at that moment in background. But till now - without success. Maybe there are other solutions?