I am using C++/Qt4.3.0.Here I am exporting an html report to .doc file containing some images that are created at run time.For that, I have used html and then inserted the html text to QString and then to QTextEdit..Now I want to make this .doc file system independent so the images that i have inseretd in .doc file should be path independent...

For this, I have used base64 encoding from QByteArray class..I have converted the image to base64 binary data..
Now, when i use this encoded data in img<src= ""> tag and then put this tag in QString ,the image does not appear...

I think there is some problem in encoding because when I encode the same image online by using some Abluestar converter then this binary data seems different from the data i am getting from QByteArray::toBase64() method..

If anyone has any idea about what the problem can be...

Recommended Answers

All 2 Replies

are you viewing this in a browser or from Word? In some browsers the base64 encoded images to not render if they are being hosted locally. Just confused about where you are viewing this document.

i want to view the image in word document and this word document should be system independent so that if i move this word doc to other PC , images should appear...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.