IRONSOFTWAREHOME

Edit PDFs

Leverage our countless features that build on existing PDF files to finalize them into perfect output files.

Edit PDF Objects with Precision

1

Translate PDF Objects

Move and position PDF objects such as images, text, and shapes with precision, ensuring that elements are correctly aligned and placed within your document.

Learn how to:access PDF DOM objects
using IronPdf;
using System.Drawing;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("Test");
// Access DOM Objects
var objects = pdf.Pages.First().ObjectModel.TextObjects.First();
// Translate by 100 points right and 100 points down
objects.Translate = new System.Drawing.PointF(100,100);
2

Scale PDF Objects

Resize PDF objects to meet your design requirements. Scale images, text, or other elements to achieve the desired appearance without losing quality.

Learn how to:scale PDF DOM objects
using IronSoftware;
using System.Drawing; // Required for PointF

// Create a PDF from a URL using a PNG image
string html = @"<img src='https://example.com/logo.png'>";
ChromePdfRenderer renderer = new ChromePdfRenderer();
// Render HTML to PDF
PdfDocument pdf = renderer.RenderHtmlAsPdf(html);
// Access the first image object on the first page
ImageObject image = pdf.Pages.First().ObjectModel.ImageObjects.FirstOrDefault();
// To scale the image to 150% of its original size uniformly
image.Scale = new System.Drawing.PointF(1.5f, 1.5f);
// Save the PDF with the scaled image
pdf.SaveAs("scaled_image.pdf");
3

Remove PDF Objects

Delete unnecessary or unwanted PDF objects from your document to clean up and streamline your content.

Learn how to:remove PDF DOM objects
using IronSoftware;
using IronSoftware.Pdfium.Dom;
using System.Linq;

// Load a PDF file
PdfDocument pdf = PdfDocument.FromFile("sampleObjectsWithImages.pdf");
// Access DOM Objects
IPdfPageObjectModel objects = pdf.Pages.First().ObjectModel;
// Remove first image
objects.ImageObjects.RemoveAt(0);

Modify Multiple Text Segments at Once

1

Extract PDF Text & Images

Extract text and images from your PDF files, enabling easy reuse or repurposing of content for other documents or applications.

Learn how to:extract text and images
using IronPdf;
using System.IO;

PdfDocument pdf = PdfDocument.FromFile("sample.pdf");
// Extract text
string text = pdf.ExtractAllText();
// Export the extracted text to a text file
File.WriteAllText("extractedText.txt", text);
2

Redact Text

Protect sensitive information by redacting text within your PDF. Permanently remove or obscure text to maintain document confidentiality.

Learn how to:redact text
using IronPdf;

PdfDocument pdf = PdfDocument.FromFile("novel.pdf");
// Redact 'Alaric' phrase from all pages
pdf.RedactTextOnAllPages("Alaric");
pdf.SaveAs("redacted.pdf");
3

Find and Replace Text

Quickly find and replace text throughout your entire PDF document, making content updates and corrections efficient and error-free.

Learn how to:find and replace text
using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>.NET6</h1>");
string oldText = ".NET6";
string newText = ".NET7";
// Replace text on all pages
pdf.ReplaceTextOnAllPages(oldText, newText);
pdf.SaveAs("replaceText.pdf");

Advocate Robust PDF Design Enhancements

1

Annotations

Add annotations to your PDF files, such as comments, highlights, or notes, to provide additional context or emphasize specific sections.

Learn how to:control PDF annotations
using IronPdf;
using IronPdf.Annotations;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Annotation</h1>");
// Create a PDF annotation object on a specified page index
TextAnnotation annotation = new TextAnnotation(0)
{
    Title = "This is the title",
    Contents = "This is the long 'sticky note' comment content...",
    X = 50,
    Y = 700,
};
// Add the annotation
pdf.Annotations.Add(annotation);
pdf.SaveAs("annotation.pdf");
2

Stamp Texts & Images

Apply custom text or image stamps to your PDFs for branding, approvals, or special markings, enhancing document professionalism and clarity.

Learn how to:stamp texts and images
using IronPdf;

using IronPdf.Editing;
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Example HTML Document!</h1>");
// Create text stamper
TextStamper textStamper = new TextStamper()
{
    Text = "Text Stamper!",
    FontFamily = "Bungee Spice",
    UseGoogleFont = true,
    FontSize = 30,
    IsBold = true,
    IsItalic = true,
    VerticalAlignment = VerticalAlignment.Top,
};
// Stamp the text stamper
pdf.ApplyStamp(textStamper);
pdf.SaveAs("stampText.pdf");
3

Custom Watermark

Create and apply custom watermarks to your PDF documents to mark them as drafts, confidential, or to add branding elements.

Learn how to:create watermark
using IronPdf;

string watermarkHtml = @"
<img src='https://ironsoftware.com/img/products/ironpdf-logo-text-dotnet.svg'>
";
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Watermark</h1>");
// Apply watermark
pdf.ApplyWatermark(watermarkHtml);
pdf.SaveAs("watermark.pdf");
4

Draw Text & Bitmap

Add custom text and bitmap images to your PDFs, giving you the freedom to include unique content elements tailored to your document's needs.

Learn how to:draw text and bitmap
using IronPdf;

using IronSoftware.Drawing;
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");
// Draw text on PDF
pdf.DrawText("Some text", FontTypes.TimesNewRoman.Name, FontSize: 12, PageIndex: 0, X: 100, Y: 100, Color.Black, Rotation: 0);
// Open the image from file
AnyBitmap bitmap = AnyBitmap.FromFile("ironSoftware.png");
// Draw the bitmp on PDF
pdf.DrawBitmap(bitmap, 0, 50, 250, 500, 300);
5

Draw Line and Rectangle

Insert lines and rectangles into your PDF to structure content, emphasize sections, or create diagrams.

Learn how to:convert rectangle
using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");
// Configure the required parameters
int pageIndex = 0;
var start = new IronSoftware.Drawing.PointF(200,150);
var end = new IronSoftware.Drawing.PointF(1000,150);
int width = 10;
var color = new IronSoftware.Drawing.Color("#000000");
// Draw line on PDF
pdf.DrawLine(pageIndex, start, end, width, color);
pdf.SaveAs("drawLine.pdf");
6

Add Headers/Footers

Incorporate custom headers and footers into your PDFs with text, images, or HTML elements, creating a consistent and professional appearance.

Learn how to:add headers/footers
using IronPdf;
// Instantiate renderer and create PDF
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello World!</h1>");
// Create text header
TextHeaderFooter textHeader = new TextHeaderFooter
{
    CenterText = "This is the header!",
};
// Add text header to the PDF
pdf.AddTextHeaders(textHeader);
pdf.SaveAs("addTextHeaderFooter.pdf");
7

Add Page Numbers

Insert page numbers into your PDF, positioning them according to your formatting preferences to maintain an organized document structure.

Learn how to:add page numbers
using IronPdf;

// Create text header
TextHeaderFooter textHeader = new TextHeaderFooter()
{
    CenterText = "{page} of {total-pages}"
};
// Render a new PDF
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello World!</h1>");
// Add header and footer
pdf.AddTextHeaders(textHeader);
pdf.SaveAs("pdfWithPageNumber.pdf");
8

Background & Foreground

Control background and foreground elements within your PDF to highlight specific content, enhance readability, or add visual appeal.

Learn how to:add background and foreground
using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Main HTML content</h1>");
// Render background
PdfDocument background = renderer.RenderHtmlAsPdf("<body style='background-color: cyan;'></body>");
// Render foreground
PdfDocument foreground = renderer.RenderHtmlAsPdf("<h1 style='transform: rotate(-45deg); opacity: 50%;'>Overlay Watermark</h1>");
// Add background
pdf.AddBackgroundPdf(background);
// Overlay foreground
pdf.AddForegroundOverlayPdf(foreground);

Ready to Get Started?

Nuget Downloads 21,105,021Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999