//install Syncfusion.Pdf.WinForms NuGet package
using Syncfusion.Pdf;
using Syncfusion.Pdf.Parsing;
//Load PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileStreamOrFilePath);
//Load first page
PdfPageBase page = loadedDocument.Pages[0];
//Extract text from first page
string extractedTexts = page.ExtractText(true);
//Close the document
loadedDocument.Close(true);