Edit PDF in C#
Powerful cross-platform .NET API for editing PDF using C# code on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
Edit PDF using Aspose.Slides
Aspose.Slides for .NET is a powerful .NET library used to manipulate and edit presentations, PDF documents, and other files. You can edit an PDF doc by adding a new line of text to it.
Edit PDF in C#
Using Aspose.Slides for .NET , you can add a new line of text to an PDF document with just a few lines of code.
C# code for editing PDF
using (Presentation pres = new Presentation())
{
pres.Slides.RemoveAt(0); // remove default empty slide
pres.Slides.AddFromPdf("doc.pdf");
AutoShape shape = (AutoShape)pres.Slides[0].Shapes[0];
shape.TextFrame.Text = "New text";
pres.Save("doc.pdf", SaveFormat.Pdf);
}
How to edit PDF in C#
Install Aspose.Slides for .NET. See Installation .
Add the library as a reference in your project.
Create an instance of the Presentation class.
Load the PDF document you want to edit.
Add a new line of text.
Save the changed PDF file.