I can successfully add metadata to an existing namespace with code like this:
Document pdfDocument = new Document("myDoc.pdf");
pdfDocument.Metadata.RegisterNamespaceUri("pdf", "http://ns.adobe.com/pdf/1.3/", "Adobe PDF schema");
PdfXmpMetadata xmp = new PdfXmpMetadata();
pdfDocument.Metadata["pdf:myCustomTag"] = "blah";
pdfDocument.Save("myDoc.pdf");
However, I don’t seem to be able to create a new namespace and add metadata to it:
Document pdfDocument = new Document("myDoc.pdf");
pdfDocument.Metadata.RegisterNamespaceUri("pdfuaid", "http://www.aim.org/pdfua/ns/id/", "PDF/UA schema");
PdfXmpMetadata xmp = new PdfXmpMetadata();
pdfDocument.Metadata["pdfuaid:part"] = "1";
pdfDocument.Save("myDoc.pdf");
Is it not possible to create a namespace, or is there something wrong with my code?