Page 1 of 1

deleting CARRIAGE RETURN(#13) and LINE FEED(#10) characters from footnote

Posted: Mon Jan 22, 2018 2:55 pm
by saeid2016
Hello support,

I want to insert a footnote with text that has CR, LF characters. but after insert, this characters have been deleted.

Code: Select all

procedure TForm1.mitInsertFootnoteClick(Sender: TObject);
var
  FootNote: TRVFootnoteItemInfo;
  NoteRef:  TRVNoteReferenceItemInfo;
  MyNoteText : string;
begin

  MyNoteText := 'This is first line'+#13+#10+'This is second line'+#13+#10+'This is third line';

  FootNote := TRVFootnoteItemInfo.CreateEx(rveMain.RVData,
    RVGetNoteTextStyleNo(rvs, rveMain.CurTextStyleNo), 1, False);
  NoteRef := TRVNoteReferenceItemInfo.CreateEx(FootNote.Document,
    RVGetNoteTextStyleNo(rvs, 0));
  FootNote.Document.AddItem('', NoteRef);
  
  FootNote.Document.AddNL(' '+MyNoteText, 0, -1);
  
  if rveMain.InsertItem('', FootNote) then
    rveNote.SetFocus;
end;

Re: deleting CARRIAGE RETURN(#13) and LINE FEED(#10) characters from footnote

Posted: Tue Jan 23, 2018 8:25 am
by Steku
From online help: https://www.trichview.com/help/index.ht ... latag.html
s is a text string to add. It must not contain CR, LF, TAB, FF characters (#13, #10, #9, #12). To add several lines of text use AddTextNL.
Maybe it helps...

Regards...

Re: deleting CARRIAGE RETURN(#13) and LINE FEED(#10) characters from footnote

Posted: Tue Jan 23, 2018 3:08 pm
by saeid2016
That's right. Thank you very much.