Page 1 of 1

Empty Header and Footer problem

Posted: Mon Nov 20, 2023 8:03 am
by a.weber
Hello Sergey,
saveing a DocX / RTF with ScaleRichView generates a header and footer, also if there is none, with an empty paragraph which uses the document "default?" first style?
In some of my cases the height of header and footer is set to zero or even a very small value and the pages borders too.
But if I open the new saved files with MS Word - the header/footer height is increased according to the empty paragraph's font height.
Which moves the whole layout verticaly.

Original DOCX in Word @100%
DocumentWithoutHeaderAndFooters_MSWord.png
DocumentWithoutHeaderAndFooters_MSWord.png (5.97 KiB) Viewed 35026 times
After save with ScaleRichView
DocumentWithoutHeaderAndFooters_ScaleRichView.png
DocumentWithoutHeaderAndFooters_ScaleRichView.png (7.33 KiB) Viewed 35026 times
you can see the newly generated paragraph - this changes the print result and PDF export of MS Word to move the whole layout.
(If I deleted the empty paragraph all is fine again)

Is there a way in ScaleRichView to suppress the storage of empty headers and footers?

Useing plain TRichView I can do something like this before saveing:
if rvHeader_Normal.RVData.IsEmpty then
rvBody.SetHeader(nil, TRVHFType.rvhftNormal);
- but I think this should happen inside the default save logic?

With best regards

André

Re: Empty Header and Footer problem

Posted: Wed Nov 22, 2023 12:28 pm
by Sergey Tkachenko
I'll check this problem at the beginning of the next week.
I this week I need to complete Delphi 12-compatible update.

Re: Empty Header and Footer problem

Posted: Tue Apr 02, 2024 7:09 am
by a.weber
Ok - tested - works - one point less on the list.
With Version 22.2 at least. Thank You