Demo: page border and background in DocX and RTF
Microsoft Word Documents (DocX and RTF) do not support page background directly.
However, there is a workaround: you can insert a text box in a header or a footer, and add an image to this textbox. Additionally, this textbox can have a border.
Actually, Microsoft Word itself uses this technique when adding a page watermark.
The demo shows how to generate a document having a page border and a page background image, and how to same it to DocX and RTF files. The demo can be found in the support forum: https://www.trichview.com/forums/viewtopic.php?t=10793
There are 4 versions of the demo: (for TRichView and for ScaleRichView) x (for Delphi and for C++Builder 11)
The demos for C++Builder 11 can be used in older versions of C++Builder, you just need to change references to packages in the CBProj file.
Note 1: A text box is positioned relative to the whole page, its size and position is calculated in absolute values (depending on the page size and margins).
Why don’t we used sizing and positioning relative to the main text area? It was done for compatibility with Libre Office. Unfortunately, its current version has problems with advanced options for textbox positioning.
Note 2: This demo shows the simplest case: the same background image for all pages. TRichView and ScaleRichView support special headers for the first page and odd/even pages, so they can have different background images and borders.
We have released TRichView 23.2 and updates of related components The main new feature in…
RVMedia 11.1 has been released Main new features: UDP streaming with FFmpeg improved error handling…
We have released TRichView 23.1 and updates of related components The main new feature in…
We've released our installer program as freeware with source code:http://www.trichview.com/ideinstall/ It was updated to version…
We have released TRichView 23 and updates of related components This update is free for…