954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Open doc file same as view as html in gmail

Hi,

I want to open user's uploaded .doc,.docx,.txt or .pdf as html (open in browser)

I can open pdf without doing any extra coding. but i can't open other formates.

I want to open files when user click on the link "Show File" at that time file will be open in browser.(same as attachment can view in browser in gmail using view as html option)

Please help me to sort out this problem.

Thanks in advance. :)

pbcomput
Junior Poster in Training
59 posts since Feb 2010
Reputation Points: 19
Solved Threads: 4
 

I haven't found a way to open a Word doc from your program and consistently retain all of the formatting:

You can open PDF, Powerpoint and TIFF files using an embedded Google Docs Viewer

There are a number of ways to open spreadsheet files.

There are a couple of utilities that will extract text from your Word document but this isn't that same as a reader to display the original document.

chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
 

Hi,

Thanks for reply.

yes i know about google docs but my files formate is .txt also.

and you are right that we can't display the .doc file with formating.

but if its possible without formatting then I want to show it without formating

same as gmail attachment .doc and .txt opens

if you have any idea related to that. then please guide me to solve this problem.


Thanks

pbcomput
Junior Poster in Training
59 posts since Feb 2010
Reputation Points: 19
Solved Threads: 4
 

This may be as good as it gets even though it is fairly basic:

http://www.phpclasses.org/package/388-PHP-Convert-any-document-that-can-be-read-by-MS-Word.html

It probably won't handle docx files.

chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
 

thanks for the link.but its not work for me.

so i got another solution for the same. :)

pbcomput
Junior Poster in Training
59 posts since Feb 2010
Reputation Points: 19
Solved Threads: 4
 

Can you please post how you have solved this issue?

lavanyac
Newbie Poster
2 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

Yes. I used Scribd api for convert docs into html like version.

I hope this helps you. :)

pbcomput
Junior Poster in Training
59 posts since Feb 2010
Reputation Points: 19
Solved Threads: 4
 

Thank You. I will try to do the same.

lavanyac
Newbie Poster
2 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: