Author Topic: How can I insert a new line in DocumentGenerator  (Read 3268 times)

mcoletti

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
How can I insert a new line in DocumentGenerator
« on: July 30, 2014, 03:25:45 am »
Hi, I have to perform the method InsertText, and then insert a new line in the generated document before the other fragments.

How is it possible  :question

Thanks, Massimo

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: How can I insert a new line in DocumentGenerat
« Reply #1 on: July 30, 2014, 06:36:42 pm »
It is possible, using the InserText method:

Try : generator.InsertText("\f", format);

Look here: http://stackoverflow.com/questions/21674865/does-c-sharp-provide-an-equivalent-to-n-for-denoting-a-page-break

mcoletti

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: How can I insert a new line in DocumentGenerat
« Reply #2 on: August 05, 2014, 12:29:30 am »
I tried, but also \f doesn't work; I tried also \par (the RTF code)

The solution is to insert a chr(13) in the text, apparently, escape characters aren't recognised.

 :)