Hello Scott,
Multi-line text can be added using PdfFileMend.AddText. Please see the following code snippet.
string
inputFile = @"C:\pdftest\Nayyer.pdf";
string outputFile = @"C:\pdftest\Nayyer_1.pdf";
PdfFileInfo fileInfo = new PdfFileInfo(@inputFile);
float height = fileInfo.GetPageHeight(1);
float width = fileInfo.GetPageWidth(1);
int rotation = fileInfo.GetPageRotation(1); //get the page rotation
string couplet1 = "1st line added,"+
"2nd Line, 3rd line and 4th line";
PdfFileMend mendor = new PdfFileMend(inputFile, outputFile);
mendor.IsWordWrap = true;
mendor.AddText(new FormattedText(couplet1), 1, 400, 700);
If you set the value for IsWordWrap to false, all the string will be added in a single line, and if value is set to True, new line will be started once the line reaches right Margin of the page.
Nayyer Shahbaz
Support Developer
Aspose Changsha Team
About Us Contact Us