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

    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#

  1. Install Aspose.Slides for .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the PDF document you want to edit.

  5. Add a new line of text.

  6. Save the changed PDF file.

Edit other files

You can also edit files in other formats