Thanks for the reply. Let me explain it a bit more. I do understand that compound document format is like a directory. But I have a stuation where I have many files win OLE 2.0 compound document format and I know each of them contains a single document (e.g. a word file, an excel sheet or a PDF file).
 
Here is the exact detail of situation I have. I have a Oracle database which stored documents (i.e. files) in records BLOB field using OLE control available in PowerBuilder.  When you store documents in this way they get conveted with OLE compound document format before getting stored to database (I guess it was done so that when upon retrieval it should be launched with its target application e.g. PDF should be opend automatically with acrobat reader). So I have many database records each of which contains a single file but stored in compound document format. Now we are porting the powerbuilder application to web application and I need to convert the documents present in existing database so that they can be accessible to web application.
 
The way I was trying to do this was to convert extract the contents of the document by using POI. I am able to get the contents out by using POI but I am not able to get the name of the file out (e.g. "My Profile.pdf"). I traversed thorugh the various parts of the compound document format (by using DocFile Viewer tool of visual studio and POIBrowser tool that comes with POI) and found that the OlePres000 section contains the name of the file stored for non office documents (i.e. everything except word, excel and powerpoint files). I have seen classes in POI to extract SummaryInformation and DocumentSummaryInformation. I believe the OlePress000 pat contains information in a similar format. So I was wondering is there a class already present or under development which I can use to extract this information and get the title of the file.
 
Attached is the OlePres000 file from a compound document file. If you open this OlePres000 file with any hex editor then you can see the name of the PDF file ("Reader.pdf") stored in there. 
 
There is a section Ole10Native in the compound document format file. I am able to extract it using POI.jar. When I rename it manually to "Reader.pdf" and open it with acrobat reader, it works. The problem I will have although is I want to automate this naming process by extracting the name out of compound document format as I have to process any of the database records in the system depending up which one user is choosing to view.
 
Thanks,
 
Abhay.

>>> [EMAIL PROTECTED] 12/28/04 11:29PM >>>
Am Dienstag, den 28.12.2004, 18:50 -0600 schrieb Abhay Chaudhary:
> I am working with porting of documents stored in from Ole 2.0 compound documents format to their native form. I am stuck with getting the name of the document out of the format for non office documents. I saw that in the compound document format heirarchy, OlePress000 usually contains the name but there is no class to handle OlePress000 contents. Can someone help me with this? Is there a future release planned for POI which will handle this?

I don't understand what you intend to do. What do you mean by "porting
documents stored in from Ole 2.0 compound documents format to their
native form"? An OLE 2 document is like a directory, and all files in
that directory are already in their "native form". An application can
store any file it wants as an entry in an OLE 2 compound document. POI
will never support all of them but most likely only a subset of the
Micro$oft Office formats.

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  [EMAIL PROTECTED]
  K�rner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

Softwarepatente verhindern: http://www.nosoftwarepatents.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to