We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading XMPMetaData

I can set various XMPMetaData properties for a PDF document.
But how do I read those properties?
The XMPMetaData does not expose any properties for reading the properties?

I found Aspose.Pdf.Kit has got a property:
http://www.aspose.com/documentation/file-format-components/aspose.pdf.kit-for-.net-and-java/aspose.pdf.kit.pdfxmpmetadata.html

But it does not mention how do I extract a specific property.

Thanks.!

Got it.!

FileStream input = new FileStream(“DocumentWithMetaData.pdf”, FileMode.Open);
PdfXmpMetadata xmpMetadata = new PdfXmpMetadata();
xmpMetadata.InputStream = input;
byte[] arrByte = xmpMetadata.GetXmpMetadata();

using(FileStream op = new FileStream(“MetaData.Xml”, FileMode.Create))
{
using (BinaryWriter br = new BinaryWriter(op))
{
br.Write(arrByte);
br.Close();
}
op.Close();
}