Hi all!
I am new to POI and am particularly interested in the HPSF & HWPF api.
I need to be able to read/write the custom properties of a document stored
in Rich Text format. I tried the following example :
http://www.koders.com/java/fid8BC38926BCD2E93865D367F0857B90CE86EFFAC5.aspx
ModifyDocumentSummaryInformation -Rainer Klute/a> and it work just fine with
a file in Ms Word Document format.
But when I run the sample with a file saved as *.rtf , I get the following
errors:
Exception in thread "main" java.io.IOException: Invalid header signature;
read 7015536635646467195, expected -2226271756974174256
at
org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:112)
at
org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151)
at
ModifyDocumentSummaryInformation.main(ModifyDocumentSummaryInformation.java:58)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
The same file saved as a .doc file , can be read. But my requirement is to
read a file that is in rich text format.
The line - at
ModifyDocumentSummaryInformation.main(ModifyDocumentSummaryInformation.java:58)
points to,
POIFSFileSystem poifs = new POIFSFileSystem(is);
Doesn't the POIFS accept an RTF file from an Input Stream? How do i work
with an RTF file?
Any pointers/ Suggestions please.
--
View this message in context:
http://www.nabble.com/Reading-custom-properties-of-a-file-in-Rich-text-format-%28*.rtf%29-tp21052739p21052739.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]