XmpPackage
PdfRootPackage.XmpPackage property
Ottiene o imposta il pacchetto di metadati XMP.
public XmpPacketWrapper XmpPackage { get; set; }
Valore della proprietà
Il pacchetto di metadati XMP.
Osservazioni
Saperne di più
Esempi
Questo esempio mostra come estrarre i metadati XMP da un file.
using (Metadata metadata = new Metadata(Constants.PdfWithXmp))
{
var root = metadata.GetRootPackage<PdfRootPackage>();
if (root.XmpPackage != null)
{
if (root.XmpPackage.Schemes.XmpBasic != null)
{
Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.CreatorTool);
Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.CreateDate);
Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.ModifyDate);
Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.Label);
Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.Nickname);
//...
}
if (root.XmpPackage.Schemes.DublinCore != null)
{
Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Format);
Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Coverage);
Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Identifier);
Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Source);
//...
}
if (root.XmpPackage.Schemes.Photoshop != null)
{
Console.WriteLine(root.XmpPackage.Schemes.Photoshop.ColorMode);
Console.WriteLine(root.XmpPackage.Schemes.Photoshop.IccProfile);
Console.WriteLine(root.XmpPackage.Schemes.Photoshop.Country);
Console.WriteLine(root.XmpPackage.Schemes.Photoshop.City);
Console.WriteLine(root.XmpPackage.Schemes.Photoshop.DateCreated);
//...
}
//...
}
}
Guarda anche
- class XmpPacketWrapper
- class PdfRootPackage
- spazio dei nomi GroupDocs.Metadata.Formats.Document
- assemblea GroupDocs.Metadata