- Offizieller Beitrag
Q: I am concatenating numerous HTTP files into a single document. The first paragraph in each section is supposed to be Centered and in a new paragraph. They sometimes are, sometimes aren't.
Code
for ii := 0 to (Sections.Count - 1) do
begin
rtfText.BookmarkInput('Section' + IntToStr(ii), true);
// load SectionX.html into inputStream
inputStream.Position := 0;
rtfText.LoadFromStream(inputStream, 'HTML', false);
end;
A: When you load text into a bookmark the first paragraph inherits the properties of the parent paragraph of that bookmark. Only if a
paragraph is completely empty the props are overwritten.
You can use the format string
'HTML-overwriteparattr'
to change this behavior.