Page 1 of 1

Can I save a background image along with the RTF file?

Posted: Fri Oct 07, 2016 12:17 pm
by Prometeus
Hello,


I tried search an answer for this question in this forum but I couldn't find one. I have an image loaded in 'BackgroundBitMap' property and I would like to save it along with the document, but the 'SaveRTF' method does not save the background image. Is it possible? My documents are saved as '.DOC' and are read using 'Word'. Thus, my application can't load dinamically the background image because the docs are loaded using another application.


Thanks.

Posted: Fri Oct 07, 2016 7:53 pm
by Sergey Tkachenko
TRichView cannot save background image in RTF.
RTF does not support background images.
Theoretically, it could be saved as a floating image below text. However, it's not possible to make it tiled or stretched.

Posted: Fri Oct 07, 2016 8:29 pm
by Prometeus
Thanks for the answer, and I sorry for hear that there is no solution to this problem.

Posted: Fri Oct 07, 2016 8:37 pm
by Sergey Tkachenko
I can implement saving background image in RTF.
But:
- only saving (when loading in TRichView, it will be ignored)
- it will be positioned in the center or in a corner of pages (because stretching and tiling is not possible in RTF)

Posted: Fri Oct 07, 2016 9:02 pm
by Prometeus
I think many people can benefit from this feature.

In my case, loading the image back won't be a problem as my application won't need to do that. But I use an almost "invisible" image on the docs produced by my application where the text itself will be on the background image and the image stays in the center taking a big space of page. If the background image is big enough to almost fit a page your solution will work, I guess.

Posted: Wed Oct 12, 2016 10:31 am
by Prometeus
What ridiculous spam is that???