FileType

PdfRootPackage.FileType property

Gets the file type metadata package.

public PdfTypePackage FileType { get; }

Property Value

The file type metadata package.

Examples

This code snippet shows how to detect the PDF version a loaded document and extract some additional file format information.

using (Metadata metadata = new Metadata(Constants.InputPdf))
{
    var root = metadata.GetRootPackage<PdfRootPackage>();

    Console.WriteLine(root.FileType.FileFormat);
    Console.WriteLine(root.FileType.Version);
    Console.WriteLine(root.FileType.MimeType);
    Console.WriteLine(root.FileType.Extension);
}

See Also