Adding metadata not working

Using the following code works fine for adding metadata to the pdf document.

using (Aspose.Pdf.Document p = new Aspose.Pdf.Document(inputStream))
{
    p.Metadata.RegisterNamespaceUri("bc", "https://MyNamespace");
    p.Metadata["bc:ConversionTime"] = DateTime.Now;
    p.Save(resultFile.FullName);
}

However, I need to add a namespace description, but with the following code the metadata **is not** added to the pdf document. The namespace, including the namespace description, is however declared in the document.

using (Aspose.Pdf.Document p = new Aspose.Pdf.Document(inputStream))
{
    p.Metadata.RegisterNamespaceUri("bc", "https://MyNamespace"**, "MyDescription"**);
    p.Metadata["bc:ConversionTime"] = DateTime.Now;
    p.Save(resultFile.FullName);
}

What am I doing wrong?

Best regards,
Håkan Olsen

@holsen

Thank you for contacting support.

Would you please visit Insert Metadata with Prefix and then share your kind feedback with us. Please ensure using Aspose.PDF for .NET 19.10 in your environment.

If you still face any problem then please share your source and generated PDF files with us.

The code in your example “Insert Metadata with Prefix” is basically the same as the code that works in my post.

However, as I mentioned, I need to add a namespace description and that code is not working.

I downloaded Aspose.Total for .NET (DLL Only) yesterday and I use the dll included in that package.

Best regards,
Håkan Olsen

@holsen

Thank you for elaborating further.

We have been able to notice the problem in our environment. A ticket with ID PDFNET-47130 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Is there any news on this matter?

Best regards,
Håkan

@holsen,

I regret to inform that issue is still unresolved. As per our company policy, the first priority for investigation is given to the Paid Support i.e. Enterprise and Priority Support on first come first serve basis. After that the issues from normal support forum are scheduled for investigation on first come first serve basis. I request for your patience and we will share good news with you soon.

Hello.
Is there any progress on this matter?

Best regards,
Håkan

@holsen

We are afraid that earlier logged ticket could not get resolved yet due to other pending issues logged prior to it. However, we have recorded your concerns and will surely consider them during issue investigation. We will let you know once we have more updates regarding its resolution. Please give us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-47130) have been fixed in Aspose.PDF for .NET 21.12.