Hi Aspose,
I have had some success with your library so far, but I have run into one specific issue that is blocking progress on a project I am using this for.
We are converting a combination of plain text and RTF data to DOCX files, which by and large has been working. However, there were some modifications to the RTF data I had to make in order for images to be embedded properly. I believe this has to do with the version of RTF being used in my source data.
Image tags are in the following general format:
{\pict\jpegblip\picwX\pichY \binZ <data>}
Where X is the picture width, Y is the picture height, Z is the number of bytes in the raw data, and is the binary data of the embedded image (we are converting the binary data to hex in order to work with it in C#).
There are additional tags based on the image format and if the picture was resized. In our case, we are only working with JPEG (\jpegblip
), PNG (\pngblip
), WMF (\wmetafile8
), and BMP (\dibitmap0
) image formats.
I noticed that out of the box, this does not work as intended. However, if we remove the \binZ
tag and ensure the <data>
is stored as hex, the conversion works for JPEG, PNG, and WMF files. The sticking point is with BMP files. I know from other testing that the BMP <data>
is stored with the first 14 bytes (file header) removed, but even if I calculate and add those 14 bytes as hex, it does not get embedded in the word document.
We have a lot of control over the actual content of the RTF source data, so I am curious if there is anything I can do to manipulate the data to allow BMP images to be embedded in the converted word document or if this is functionality that is not possible with the current version of Aspose.Words. Any help would be greatly appreciated. Unfortunately, I am unable to share any actual source data, due to privacy concerns.
Thanks,
Johnny
This Topic is created by alexey.noskov using Email to Topic tool.