Answer:
In HWPFDocument.java file you will get _dgg container object, make use of
this object to get information about the shapes in Word 2003
sample code:
List<EscherRecord> escherRecords = _dgg.getEscherRecords();
if(escherRecords.get(1).getChildRecords() != null )
{
Iterator<EscherRecord> iterator =
escherRecords.get(1).getChildRecords().iterator();
while(iterator.hasNext())
{
EscherRecord escherRecord = iterator.next(); //In escherRecord
you will get all Types of EscherRecord (Dgg, Sp, Opt, ClientAnchor), if not
then check
// child and iterate Again.
}
}
you can get all information about the shape, Information like shapeName,
fillColor, Linecolor, Rotation, Adjustment Value etc.
On Wed, Feb 8, 2012 at 4:20 PM, pratik sharma <[email protected]> wrote:
> Hi i am looking for a sample code to Render Shape and get data about the
> Shape (Data like Shape Name, Adjustment value, height, width etc) for 2003
> Word.
>
> ShapesTable file under hwpf package is not giving any information about
> shapes.
> it will be useful if someone tell me how to get EscherContainerRecord.
>
> Thanks in Advance.
>