Free Support Forum - aspose.com

Losing images after updating documents (Java 1.4 Aspose.Words)

I'm using the Java 1.4 version of the Aspose.Words suite.

My web application uploads a Word document, modifies a couple of tables and then get the user to save the updated document.

In our UAT testing, it was noted that our company logo gets "lost" in the updated document.

I have performed a test where I upload the document, do no modifications, and then re-save, however the image/logo still gets lost.

The code I'm using to upload the file is....

private com.aspose.words.Document uploadDocument(FormFile uploadFile) throws Exception {
com.aspose.words.Document document = new com.aspose.words.Document(new ByteArrayInputStream(uploadFile.getFileData()));
return document;
}

And for download....

private void downloadFile(com.aspose.words.Document document) throws Exception {
File tmp = File.createTempFile(_downloadOutputFileName, ".doc");
document.save(tmp.getAbsolutePath());

getResponse().setContentType("application/msword");
getResponse().setHeader("content-disposition",
"attachment; filename=" + _downloadOutputFileName + ".doc");

FileInputStream fis = new FileInputStream(tmp.getAbsolutePath());
ServletOutputStream out = getResponse().getOutputStream();

try {
int i;
while ((i = fis.read()) != -1) {
out.write(i);
}
} finally {
fis.close();
out.close();

tmp.delete();
}
}

I've attached a sample document.

Am I doing anything wrong....

Image handling is not yet supported in Aspose.Words for Java.

The issue discussed here: http://www.aspose.com/Community/Forums/49050/ShowPost.aspx

Regards,

Do you have any update on the timeframe for image support ?

From the link, I guess support will be available in July 2006

Yes, July-August 2006 is our current estimate.

Can you provide an update on the timeframes for this functionality ?

Our current estimate is August 2006.

Best regards,

Are you able to provider a firmer date for this functionality ?

The release date for this feature is the end of October 2006. The date was delayed because we have made a major improvement of shape and image handling in .Net version and are doing a port of this feature to Java version now.

Best regards,

Hello,

We purchased Aspose.Words a couple of months ago for an application we've written but we desperately require the image functionality to be provided in order for us to release our application as the images being dropped is a big problem for our users. We were looking forward to the Aspose.Words August 2006 release for this functionality as advised in this thread so we could test & run our application. The revised end October 2006 date is disappointing as this really puts our application at risk due to this delay.

Is there any way we could get a test / beta java version if it is available that could support not losing the images in the interim so we could do a demonstration to a user of our application ? We don't need to change or resize images in our conversion - just keep them the same as they were in the original document.

I'm not sure what else is planned for the next (now October 2006) release of Aspose.Words but the images being dropped is the showstopper for us so I'm keen to get a version of Aspose.Words that doesn't drop the images as soon as possible - even if it's just for a demo to a user in a test region.

Thanks, Mike.

Hello Mike,

Sorry for delaying the ETA for this feature. We understand that this functinality is exteremely important for our users and are doing what we can to deliver it as soon as possible. Unfortunately, the graphics support is a complex and interweaved feature of word document format and cannot be delivered in parts. We will keep you in mind however when we enter the testing phase for this feature. I will inform our lead Java developer of your request. He will keep you posted of our progress in this matter.

Best regards,

Vladimir & Lead Developer,

Thanks for your reply. Any updates as soon as you have any relating to this matter of losing images will be appreciated as we are planning our next steps with our application due to the delay.

Once again, if there’s any possibility to get a (test ?) release that conserves the original images as they were in the source document, please advise as this will greatly assist our situation.

Regards, Mike.
ph: + 617 32324360 (w).