Thursday, April 28, 2011

Preview any file in the browser using Google Docs Viewer (No need to upload it to Google Docs)


Finally I could find a good way to preview the documents. It’s Google Docs Viewer (https://docs.google.com/viewer) (Not the google docs)

What we have to do is we have to just upload the file in our server and create the link in a different way and viewing it. So no need to upload the document to Google docs.

Follow is the test file that I checked with uploading the file to my server


Supporting Formats
  • Microsoft Word (.DOC and .DOCX)
  • Microsoft Excel (.XLS and .XLSX)
  • Microsoft PowerPoint (.PPT and .PPTX)
  • Adobe Portable Document Format (.PDF)
  • Apple Pages (.PAGES)
  • Adobe Illustrator (.AI)
  • Adobe Photoshop (.PSD)
  • Tagged Image File Format (.TIFF)
  • Autodesk AutoCad (.DXF)
  • Scalable Vector Graphics (.SVG)
  • PostScript (.EPS, .PS)
  • TrueType (.TTF)
  • XML Paper Specification (.XPS)

__________________________________________________________________________________


But we have to do change that url to http%3A%2F%2Fwww.asoftit.com%2FTestDoc.docx   (: = %3A  |   / = %2F  )

Use str_replace function in PHP to do this

No comments:

Post a Comment