Page 1 of 1

Problem retrieving the images (Relationship Part)

PostPosted: Fri Aug 07, 2009 3:44 am
by vipin.neelam
Hi Guys,
Just downloaded the docx4j and was tring to run sample to read images in document. Not sure I am getting getting pointer exception..

I was tring this sample org.docx4j.samples.ConvertEmbeddedImageToLinked..

This is the piece of code is problem..
Part p = relsPart.getPart(r);
FileOutputStream fos = new FileOutputStream( f );
((BinaryPart)p).writeDataToOutputStream(fos);
fos.close();

basically p is becoming null for any image in doc. Am I missing any setting here???

Re: Problem retrieving the images (Relationship Part)

PostPosted: Tue Aug 11, 2009 9:57 pm
by jason
If you are still having problems, please post the problematic docx, and any stack trace. thanks.