Free Support Forum - aspose.com

Docx becomes one page and image is truncated

I am using Aspose.Words 10.8 (.Net 4.0 version) to create a tiff document from a docx (see attachments). The docx has two pages with one image on each page. The resulting tiff has only one page with the second image truncated. In debug mode I can see that the created Aspse.Words-Dokument object only has one page directly after I read the docx-file with the Aspose.Words library.

Can someone help me with this?

Hi,


Thanks for your inquiry. While using the latest version of Aspose.Words i.e. 10.8.0, I managed to reproduce this issue on my side. Your request has been linked to the appropriate issues and you will be notified as soon as these are resolved. Sorry for inconvenience.

However, you can use the following code snippet as a temporary work around:

Document docx = new
Document(@“c:\test\Anker.docx”);

MemoryStream docStream = new MemoryStream();
docx.Save(docStream, SaveFormat.Doc);

Document doc = new
Document(docStream);

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
foreach (Shape
shape in shapes)
{
shape.WrapType = WrapType.Inline;
}

doc.Save(@“c:\test\Anker_out.tiff”);

I hope, this will help.

Best Regards,

Thank you very much for reviewing this issue.

Unfortunately, the proposed workaround does not work properly. It messes up the anchor points of images. In the attached document, for example, the achor point of the image is at the very bottom of the page. It seems like the proposed workaround moves the anchor of the image off the page and therefore the image gets deleted.

Is there a side-effect-free workaround available?

Hi
Peter,


Thanks for your inquiry. First of all, please note that the work around was meant for Anker.docx document and was not the actual solution. Secondly, in this case, I would suggest you use the proper way of saving DOCX to TIFF format as follows:

Document doc = new
Document(@“c:\temp</font>TestAnkerUnten.docx”);
doc.Save(@“c:\temp\out.tiff”);

I hope, this will help.

Best Regards,

The issues you have found earlier (filed as WORDSNET-5718) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-3958) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(4)