Better Uploader(disclaimer: my own plugin, but it’s free) comes with an element called ‘Better File Previewer’. What it does is detects whatever file you provide it and it chooses the best way to view the file. If it’s a PDF or an image, it’ll use an <object> or <iframe> tag. If it’s an Office document such as word, excel or powerpoint, it’ll preview it in a compatible container. If it detects there are no great solutions, it defaults to a fallback image that you determine.
It also automatically updates if ever the data source changes. Hope this helps