pdf_oxide 0.3.24

The fastest Rust PDF library with text extraction: 0.8ms mean, 100% pass rate on 3,830 PDFs. 5× faster than pdf_extract, 17× faster than oxidize_pdf. Extract, create, and edit PDFs.
Documentation
// Open a PDF, modify metadata, delete a page, and save.
// Run: dotnet run --project csharp/ -- input.pdf output.pdf

using PdfOxide.Core;

if (args.Length < 2)
{
    Console.Error.WriteLine("Usage: dotnet run -- <input.pdf> <output.pdf>");
    return 1;
}

var input = args[0];
var output = args[1];

using var editor = DocumentEditor.Open(input);
Console.WriteLine($"Opened: {input}");

editor.SetTitle("Edited Document");
Console.WriteLine("Set title: \"Edited Document\"");

editor.SetAuthor("pdf_oxide");
Console.WriteLine("Set author: \"pdf_oxide\"");

editor.DeletePage(1); // 0-indexed, deletes page 2
Console.WriteLine("Deleted page 2");

editor.Save(output);
Console.WriteLine($"Saved: {output}");

return 0;