I’ve been given the task of generating PDFs using data stored in an SQL database using ASP.NET and C#. So far, I have managed to store the results of SQL queries into string variables, but when I use these variables to pull the data into a PDF format, I’m given the following error:
Argument 1: cannot convert from ‘string’ to ‘Aspose.Pdf.BaseParagraph’
How should I navigate this challenge? Thank you in advance. Below is the code that gives me this error:
// Add text inside a float box
Aspose.Pdf.FloatingBox floatNames = new Aspose.Pdf.FloatingBox(500, 500);
floatNames.VerticalAlignment = VerticalAlignment.Top;
floatNames.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Right;
string names = string.Concat(cmdstr_firstName + " " + cmdstr_lastName);
floatNames.Paragraphs.Add(names);
resume.Pages[1].Paragraphs.Add(floatNames);