poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@apache.org>
Subject Re: HPSF (Was: Re: HDF)
Date Fri, 30 May 2003 10:24:15 GMT
Note that it is highly unlikely that word "requires" the summary
information.  If its not there Excel doesn't complain at all.  If you open
in excel and then save, it adds it.

Its just for the author information and stuff when you go File->Properties
on a word document.

-Andy

On 5/30/03 5:23 AM, "Praveen Mathew" <prmathew@in.ibm.com> wrote:

> 
> Thanks Rainer for your detailed explanation for Summarystream!!
> 
> Thanks & Regards
> Praveen
> 
> 
> 
> 
> 
>                  
>                     Rainer Klute
>                     <klute@rainer-klu        To:       "POI Developers List"
>                     te.de>                    <poi-dev@jakarta.apache.org>
>                                              cc:       "Rainer Klute"
> <rainer.klute@epost.de>
>                     05/30/03 02:37 PM        Subject:  Re: HPSF (Was: Re: HDF)
>                     Please respond to
>                     "POI Developers
>                     List"
>                  
>                  
> 
> 
> 
>> I just need to make a valid Word Document. Is it necessary that I should
>> make & write the Summary & Doc Summary information streams also?
> 
> I don't know if you really need it. It depends on what Word does
> if you are trying to open a document which does not have a
> summary information stream. To minimize work you could try if
> you can get away without it, but don't be disappointed if that
> doesn't work.
> 
> 
>>> But if you just want to create a valid M$
>>> Word document and don't care about the contents of the summary
>>> information stream, you could copy one from an existing Word
>>> document using POIFS' functionality.
>> 
>> How can I do this using POIFS functionality??
> 
> Here's a rough outline:
> 
> 1. Read the bytes of a summary information stream from an
> existing Word document. You need the classes of the
> org.apache.poi.poifs.eventfilesystem package. Create a
> POIFSReader and register a POIFSReaderListener to be triggered
> on the file "\005SummaryInformation". In the processPOIFSReaderEv
> ent method of the latter read all bytes from that stream. You
> don't need HPSF to do so since you are not interested in the
> meaning of the stream's contents.
> 
> 2. Create your output file (POI filesystem). This is done with
> classes from the org.apache.poi.poifs.filesystem package.
> 
> 2.1. Create a POIFSDocument instance.
> 
> 2.2. Call the createDocument method of your POIFSDocument
> passing it an input stream containing the bytes you have read as
> described above.
> 
> 2.3. Call createDocument for each other entry you need in the
> POI filesystem, especially the contents of the Word document.
> 
> 2.4. Call POIFSDocument.writeFilesystem write the whole POI
> filesystem to disk.
> 
> Best regards
> Rainer Klute
> 
>                          Rainer Klute IT-Consulting GmbH
> Dipl.-Inform.
> Rainer Klute             E-Mail:  klute@rainer-klute.de
> K├Ârner Grund 24          Telefon: +49 172 2324824
> D-44143 Dortmund           Telefax: +49 231 5349423
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?


Mime
View raw message