Hi. I have a problem with DocIO. I am loading an rtf string which contains an embedded image. It displays fine in the rtf viewer I am using but when converting it into docx the image disappears. I have attached a zip file with the rtf and the resulting docx. This is the code I am using for the conversion:
Using WordDocument = New WordDocument(rtffile, FormatType.Rtf)
Obviously rtffile and Dfile contain file names and paths
Thanks, Ralph Baer
Please find the details below,
We have reproduced the reported problem “Image is missing while converting an RTF to Word document” in our end, and we suspect it to be a defect. We will validate this issue and update you with more details on 27th March 2023.
Anto Nihil S
Yaay!! I found another bug for you!!
I celebrate because in our product every-time a customer of ours finds a bug that we can squash, it's one less for the future so we celebrate! I hope you do too!
Thanks for your prompt reply and I wait with 'bated breath!
Best regards, Ralph
Ralph, on further
validating, we found that the document is plain text but the extension is .rtf. So we copied that content in the input document and pasted in a new RTF
document. In that RTF document, we
have found that the reported issue is due to the unsupported images present in
the RTF document.
In the input RTF document, the image is in dibitmap type (device-independent bitmap *.bmp or *.dib). When opening the given RTF document in the Microsoft Word application, it automatically converts that dibitmap image into .png image format in the file level, to preserve properly in visual appearance. DocIO doesn’t support this type of image conversion.
As a workaround, we suggest you open and save that new RTF document using Microsoft Word application and then open using DocIO. We have modified the document according to this and it can be downloaded from the below link,
Also, find the plain text document containing the modified RTF structure below.,