To answer your questions in no specific order. The Document Summary Information is exactly that, it is information about the document such as the author, the date the document was created, etc. Now as to sections within that stream, well I am not at all sure about this and would guess that you need to look at Microsoft's documentation that describes the file format. If you were going to push me for an opinion, then I would guess that it is possible to create sections within the summary information stream to store meta data about the document that has meaning to you or to other users within your organisation; but that is a guess.
Now to turn to pages. Word does not recognise the concept of pages as such within the .doc file. Rather, as Word assembles the page to display it to the user, then it formats the stream of information into pages at that point. If you think about it, this makes sense as the user may have set a specific page size or default font. The only reliable way I can think of to force content onto another page is to use a page break as Nick originally suggested. That way, you can be confident that whatever page size the user selects then the content will always appear on a specific page. The question of how to insert a page break is a puzzling one. I do not think that HWPF contains a constant that defines the control character you have to insert into the stream to indicate a hard page break; that is think though as I do not know this for a fact. Finally, there is no user guide for HWPF. Sadly, it is rather a bit of an orphan child in the family so to speak, and is very much in need of support and development. The original lead developer signed a non-disclosure agreement with Microsoft when he accepted a new position and constrained, therefore, to cease working on the API. Since that time, it has been patched and altered but not subjected to a complete overhaul. Recently Sergei has undertaken quite a bit of work on the API in attempt to make it more reliable and coherent but I do not know what success he has had. The HWPF 'page' on the website still indicates that someone is needed to take over the lead in developing this API if you are interested (hint). Maybe if you intend to make extensive use of HWPF, it might be worth approaching you employer to see if they would support this? The best source of examples can be found in the test code that accompanies the API. If you download the source code from the repository - http://svn.apache.org/repos/asf/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/ - then you should find some code to help you out with the basics. Aside from that, I cannot really be of any help, sorry. It is a very long time since I used HWPF and am not sure how it has advanced in the recent past. Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-add-section-in-HWPFDocument-tp5709801p5709825.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]
