Skip to Content
NexPDF

PDF/A and PDF/UA

Convert the document shown in a .NET MAUI PdfView to PDF/A or PDF/X, and tag it for PDF/UA accessibility.

English

License module

PDF/A, PDF/X and PDF/UA need the standards module (Enterprise tier).

using System.Text.Json.Nodes;

var doc = view.Document!;

doc.ConvertPdfa();                                           // PDF/A for archiving
var report = JsonNode.Parse(doc.AutoTag("en-US", 0))!;       // PDF/UA structure tree
System.Diagnostics.Debug.WriteLine($"{report["headings"]} headings, warnings: {report["warnings"]}");

doc.Save(Path.Combine(FileSystem.AppDataDirectory, "archive.pdf"));

ConvertPdfx() prepares a file for print instead. AutoTag(lang, force) takes a BCP 47 language tag and force = 1 to re-tag an already tagged file; its report lists warnings that need a person, such as figures that need real alternative text.

ConvertPdfa() writes PDF/A-2b. To convert to another level (1a to 4f) and check the result, or to check the PDF/UA tagging, use ConvertPdfaLevel(level), ValidatePdfaJson(level) and ValidatePdfuaJson(); to convert to PDF/UA-1 or PDF/UA-2 in one call, use ConvertPdfuaJson(part, lang). See PDF/A and PDF/UA validation.

What each conversion writes is described in the .NET standards guide.