I have learned the following - 

"Word picture structures are concatenated one after the other in the data 
stream if the document contains pictures. Data stream is easily reachable via 
HWPFDocument._dataStream property. A picture is represented in the document 
text stream as a special character, an Unicode  whose CharacterRun.isSpecial() 
returns true. The file location of the picture in the Word binary file is 
accessed via CharacterRun.getPicOffset(). The CharacterRun.getPicOffset() is a 
byte offset into the data stream. Beginning at the position recorded in 
picOffset, a header data structure, will be stored. "


If I wish to insert one or more Picture(s),  
[org.apache.poi.pwpf.usermodel.Picture] picture files, from a Java.io.File 
object of an available OS file,

(using 

byte [] content = Picture.getRawContent();

)
-What is the unicode/byte(s) I am looking for in my HWPFDocument data stream 
where I place Picture Data?

-How do I terminate the new place in the Word HWPFDocument where Picture data 
in the stream ends?

-May I perform the same process, ad infinitum, for as many Picture(s) desired, 
in a HWPFDocument?

-How do I specify in the datastream what the image type is, 

by sending the bytes of the java.io.File image object to the appropriate fields 
in the Picture Object
created from this stream 

[Picture.BMP/Picture.GIF/Picture.JPG/Picture.WMF1/Picture.WMF2] 

before callying getRawContent();

?

Many Thanks.

Reply via email to