+ Start a Discussion
Ravikant kediaRavikant kedia 

How to preview a PDF file before upload and after selecting from system ?

I have an `<apex:inputFile />` for selecting a PDF file from system. After selecting the PDF file I want to view  selected PDF. How can I do it.?
Please give me some idea for to do it.
@LaceySnr - Matt Lacey@LaceySnr - Matt Lacey

There's no standard way to display this before it's been uploaded because the org has no idea that the file exists until it receives the data. Unless you can find some weird javascript plugin that somehow caters for it, this sounds like the kind of situation where you're better off training your users to check what they're uploading in advance. For instance, on a Mac in the file select dialog simply hitting the space bar would popup a preview of the document. Essentially this sounds like a lot of work for little real benefit.