I am using FreeSpire.PDF.4.3.1 with .NET Framework 4.6.2.
I am unable to load rtf text (defined on a single rtf page in WordPad with #Tags that gets replaced by strings) from a rtf template file to pdf over multiple pages.
When the replacement text of the rtf #tags below (e.g. #MyDescription1,...) is long enough to not fit on a single page, then the remainder of the text is not generated on the next page of the pdf. It gets truncated to only one page.
****Sample C# code BEGIN*****
string readAllText = File.ReadAllText("myTemplate.rtf);
readAllText = readAllText.Replace("#MyDescription1", "Description 1......");
readAllText = readAllText.Replace("#MyDescription2", "Description 2......");
.....
readAllText = readAllText.Replace("#MyDescription15", "Description 15......");
PdfDocument pdf = new PdfDocument();
page = pdf.Pages.Add(PdfPageSize.A4, margin);
page = pdf.Pages.Add(PdfPageSize.A4, margin);
page.LoadFromRTF(readAllText, page.Canvas.ClientSize.Width, maxHeight, true, startingPoint);
pdf.SaveToFile("myFile.pdf");
pdf.Close();
****Sample C# code END*****
How do I change the source code above to have the rtf text over multiple pdf pages if it does not fit on a single page?