An XMP packet: the properties of one rdf:RDF element, with typed getters for the properties PDF files commonly use.
public sealed class XmpPacket
ISO 16684-1 §7. A packet is one rdf:RDF element, optionally inside an x:xmpmeta element and an
<?xpacket?> wrapper (§7.3), neither required. Its rdf:Description elements all describe the same resource
and their properties are merged; a property written twice keeps its first value. Properties are identified by namespace name and
local name (see XmpNamespaces), never by prefix. Every form §7.5-7.9 allows is read: simple values as elements
or as attributes, structures as nested descriptions, rdf:parseType="Resource" or attributes, arrays as rdf:Bag,
rdf:Seq and rdf:Alt, and qualifiers written with rdf:value.
Reading (TryParse(ReadOnlySpan<Byte>, out XmpPacket?)): a leading byte order mark selects UTF-8, UTF-16 or UTF-32 (§7.1; without one, UTF-16 is
recognized by the first character and anything else is read as UTF-8); bytes before the first < are skipped; reading
stops at the end of the rdf:RDF element, so the packet padding and whatever follows it are never read. The XML is read
with document type declarations refused (no entity is ever expanded and nothing outside the packet is fetched) and at most
16 million characters. Malformed XML before the end of rdf:RDF makes the whole packet unreadable.
Immutable: a snapshot of the bytes it was read from. The document's own packet is written through Properties, which keeps every property and rewrites the packet in canonical form.
kind:method, kind:property, kind:ctor. Press Esc to clear.AboutGets the rdf:about attribute of the descriptions (the empty string for a PDF document's own metadata), or null when none has one.CreateDateGets xmp:CreateDate (the Info dictionary's CreationDate), or null when absent or not a date.CreatorsGets the creators, dc:creator, in order (the Info dictionary's Author); empty when absent.CreatorToolGets xmp:CreatorTool, the tool that created the document (the Info dictionary's Creator).DescriptionGets the description: the default alternative of dc:description (the Info dictionary's Subject).DocumentIdGets xmpMM:DocumentID, the identifier of the document across its versions.FormatGets the media type, dc:format, such as application/pdf.InstanceIdGets xmpMM:InstanceID, the identifier of this version of the document.KeywordsGets pdf:Keywords (the Info dictionary's Keywords).MetadataDateGets xmp:MetadataDate, or null when absent or not a date.ModifyDateGets xmp:ModifyDate (the Info dictionary's ModDate), or null when absent or not a date.PdfAConformanceGets the PDF/A conformance level the document claims, pdfaid:conformance, such as B.PdfAPartGets the PDF/A part the document claims, pdfaid:part, or null.PdfUAPartGets the PDF/UA part the document claims, pdfuaid:part, or null.PdfUARevisionGets the year of the PDF/UA part's edition the document claims, pdfuaid:rev (PDF/UA-2), or null.PdfVersionGets pdf:PDFVersion.ProducerGets pdf:Producer (the Info dictionary's Producer).PropertiesGets the top-level properties, in the order written.SubjectsGets the subjects, dc:subject; empty when absent.TitleGets the title: the default alternative of dc:title.TrappedGets pdf:Trapped (the Info dictionary's Trapped): True, False or Unknown.GetLanguageAlternative(String, String, String?)Returns one alternative of a language alternative such as dc:title.GetProperty(String, String)Returns the top-level property with the given name.GetText(String, String)Returns the text of a simple property, exactly as written.TryParse(ReadOnlySpan<Byte>, out XmpPacket?)Reads an XMP packet; never throws.