open rtf with headers/footers produced by msword

General TRichView support forum. Please post your questions here
Post Reply
alexdmatveev
Posts: 1
Joined: Wed Mar 01, 2017 2:56 pm

open rtf with headers/footers produced by msword

Post by alexdmatveev »

Hello collegues,

our customer wants next scenario to be implemented:

1. he prepares RTF template with MS Word including footers, headers (tables, images are in both)
2. our report engine withh analyze rtf tags and provide data from a database
3. as result we have RTF file
4. this RTF file should be printed from Delphi application not using MS Word.

steps 1-3 are done already.
We have next rtf file: https:// drive. google. com/file/d/0B_yXRitSWH1VRUdtN0QzRE1SSkk/view?usp=sharing.
(sorry for this terrible link, the forum engine does not aloow me to insert good formatted link).

So now we have the task to open this file to show correctly to user and allow to print it.

We have tryed TcxRichEdit but have no pages and so on.

Is it possible with your TRichEdit?

Thanks.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: open rtf with headers/footers produced by msword

Post by Sergey Tkachenko »

1) You can use ScaleRichView. It includes WYSIWYG editing component (TSRichView) supporting headers and footers. Page number and page count fields are supported.
You can test it by loading your RTF file in ScaleRichView ActionTest editor
(<TRichView Dir>\ScaleRichView\Demos\ActionTestTabs\)
There is a compiled version of this demo: http://www.trichview.com/download/demo.html

2) You can use our richedit component (TRichViewEdit, or DevExpress version TcxTRichViewEdit), but it's more difficult: you need multiple editors. One for the main document, one for a footer, one for a header, and even more if you have different headers/footers for the first and odd/even pages.
There is a demo in <TRichViewDir>\TRichView\Demos\Assorted\Printing\Headers\
But ScaleRichView is recommended.

Note: our components support headers in RTF documents created by MS Word, including special headers for the first page and odd/even page. But our components do not support document sections yet, so these headers/footers must be defined for the first document, not for sections.
Post Reply