function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
code developercode developer 

Document (word,ppt,pdf,excel) Viewer / Content Preview in visualforce


We need to implement document preview in visualforce. the document may be image, pdf,ppt,word.
This is similar to chatter file previewer. I have gone through some hacks in salesforce,but if salesforce changes might reflect the functionality in future.

Any inputs or code samples are highly appreciated. Thank you
I doubt it would be feasible to implement a complete document previewer in Visualforce - you'd need to be able to convert files of any size and format to HTML markup, which would be highly likely to breach governor limits.

I'd be inclined to leave the previewing up to the browser - that way, if the user has a plugin or program installed that can display the document, that will be used. Another way might be to use the box view API,,  but I haven't implemented against that so I can't say for sure that it would work.
@Ashish Narang@Ashish Narang
We have implimented flash based preview as mention on