Free Support Forum -

RTF to PDF issue with image rendering using .NET

See attached files “No Image.rtf” does not correctly get converted by Aspose.Words to a PDF. The image is not shown. “Image.rtf” works fine. The difference between the two is the \v tag in the document. If \v is present in any style or anywhere in the document, then subsequent images do not show.

Hi Emil,

Thanks for your query. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-6639 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is
resolved. We apologize for your inconvenience.

What can we do to expedite fixing this bug? This is a blocking issue for a very important customer of ours. We are willing to pay you guys to fix this, but we would need a cost and a timeline from you.

Hi Emil,

Thanks for your request. This issue is pending for analysis and is in the queue. I am afraid, I can’t provide you any reliable estimate at the moment. Once your issue is analyzed, we will then be able to provide you an estimate.

Please use the following code snippet as a workaround. Let us know if you have any more queries.

Document doc = new Document(MyDir + “NoImage.rtf”);

Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

MemoryStream stream = new MemoryStream();


Document doc2 = new Document();

DocumentBuilder builder = new DocumentBuilder(doc2);


doc2.Save(MyDir + "AsposeOut.rtf");


The document that I gave you is just an example of the problem. So, that work-around in itself is not useful. Is there some attribute that I can set on each image or shape so that it is not invisible? Or is the invisibility attribute set at some higher level?

Ideally, I would want to load the rtf, iterate through all images, setting them visible, and then saving the document. What is the best approach to doing this?



I think something like this should work:

NodeCollection shapes = d.GetChildNodes(NodeType.Shape, true, false);

foreach (Aspose.Words.Drawing.Shape shape in shapes)
if (shape.HasImage)
shape.Font.Hidden = false;

Hi Jake,

Thanks for your feedback. It is perfect that the shared workarounds resolved your problem. Please let us know any time you have any further queries. We are always glad to help you.

Any word on fixing this?

Hi Emil,

Thanks for your patience.

afraid your issue has now been postponed. We will inform you as soon as
there is any further developments. We postponed it because currently we
have to work on other important features.

We apologize for your inconvenience.

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

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