How to display MS Word document content in portlet?

Hi,

I'd like to display MS Word document content in a portlet or portal page, is it possible to do so?  I'm currently using Oracle Portal 10g.

thanks!
al9763Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrandSchtroumpfCommented:
MS Word is a proprietary format, so it's better not to use it.
Only browsers that have a plugin installed will be able to display the file.
If you still want to do that, you can display the Word file inside and IFRAME and hope your visitors will be able to view it.
I have only tried that technique with PDF files, but i heard it also works with Word files (as long as you don't have html layers such as a popup menu that overlap your iframe).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DevastatedCommented:
Heya,

if it is only the content you are wishing to put on the web...

save the word files for the web (most modern versions of word have this option) - MS Word writes its web pages in XML - a very pliable format.

this can then be saved in a myriad of formats using Oracle - as you desire.

Hope this helps.
DevastatedCommented:
oops...

this can then be saved in a myriad of formats using Oracle - as you desire.
SHOULD READ
this can then be stored in a myriad of formats using Oracle - as you desire - a blob - binary - an xml blob etc etc - for total control.
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

rdivilbissCommented:
The simplest thing to do would be to get a open source PDF converter and print your word document to PDF format before loading it to the web. You can also get web server based PDF converters which will perform on the fly conversion, however you will need to load a component on the web server, which may not be an option.
avidyaCommented:
or you can save the word doc as html and publish that page, anyone should be able to view it.
in msword choose: file/save as/*.htm
DevastatedCommented:
As i said earlier if u save a Word document for the web it writes it in xml...

for example here is a xml from a word 2003 document saved as html with only one word in the document - blobby (notice what looks like inline xsl also - and no i dont know what filelist.xml is, it isn't there! :p ).

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="blobby_files/filelist.xml">
<title>blobby</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>User</o:Author>
  <o:LastAuthor>User</o:LastAuthor>
  <o:Revision>1</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Created>2005-07-06T19:24:00Z</o:Created>
  <o:LastSaved>2005-07-06T19:24:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>1</o:Words>
  <o:Characters>6</o:Characters>
  <o:Company>HOME</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>6</o:CharactersWithSpaces>
  <o:Version>11.5606</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:UseWord2002TableStyleRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
      {mso-style-parent:"";
      margin:0cm;
      margin-bottom:.0001pt;
      mso-pagination:widow-orphan;
      font-size:12.0pt;
      font-family:"Times New Roman";
      mso-fareast-font-family:"Times New Roman";}
@page Section1
      {size:595.3pt 841.9pt;
      margin:72.0pt 90.0pt 72.0pt 90.0pt;
      mso-header-margin:35.4pt;
      mso-footer-margin:35.4pt;
      mso-paper-source:0;}
div.Section1
      {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
      {mso-style-name:"Table Normal";
      mso-tstyle-rowband-size:0;
      mso-tstyle-colband-size:0;
      mso-style-noshow:yes;
      mso-style-parent:"";
      mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
      mso-para-margin:0cm;
      mso-para-margin-bottom:.0001pt;
      mso-pagination:widow-orphan;
      font-size:10.0pt;
      font-family:"Times New Roman";
      mso-ansi-language:#0400;
      mso-fareast-language:#0400;
      mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>

<body lang=EN-GB style='tab-interval:36.0pt'>
<div class=Section1>
<p class=MsoNormal>blobby</p>
</div>
</body>
</html>
al9763Author Commented:
Hello,

Thank you all for providing these great information.  But I have a lot of word documents which some of these documents are quite large in size so I figured it'd be better to view the document contents in portlet/page instead of downloading each documents to local hard disk or use browser to view it.  Is there a way to pass document content as a parameter and load it in portlet?
DevastatedCommented:
? so you haven't got a solution ?
rdivilbissCommented:
>Is there a way to pass document content as a parameter and load it in portlet?

You could pass the document's name in a parameter and write a page to retrieve and display the contents but that would be pointless. Whatever you stream to the browser will get downloaded to the local browsers hard drive (cache).

To pass the content in a parameter would be fruitless due to browser restrictions on the size of parameters.

If you have a large number of documents to deal with, you can use a product such as omniformat to bulk reformat those documents to XML. PDF or HTML.

http://www.omniformat.com/
DevastatedCommented:
To clarify...

a portlet is generally a pluggable user interface component that provides a presentation layer (or in other words a GUI component that merely serves to present information)...
- it is not a magical device that allows somebody to view a webpage (and therefore the content within that webpage, whatever it may be) without having to download it first - 1st rule of the internet - to view it you must first download it. :)

If you would like to break up large document into smaller sections to facilitate easier viewing for the user kind of thing... then maybe you should read my earlier post :p

good luck
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.