For all supported image formats the GroupDocs.Metadata API allows extracting common image properties such as width and height, MIME type, byte order, etc. Please see the code snippet below for more information on the feature.
Load an image Extract the root metadata package Use the getImageType method to obtain file format information advanced_usage.managing_metadata_for_specific_formats.image.ImageReadFileFormatProperties
try (Metadata metadata = new Metadata(Constants.InputPng)) { ImageRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getImageType().getFileFormat()); System.out.println(root.getImageType().getByteOrder()); System.out.println(root.getImageType().getMimeType()); System.out.println(root.getImageType().getExtension()); System.out.println(root.getImageType().getWidth()); System.out.println(root.getImageType().getHeight()); } More resources GitHub examples You may easily run the code above and see the feature in action in our GitHub examples:...Viewer Product Solution GroupDocs...to view and edit metadata of PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX...
This article explains the ability of the GroupDocs.Redaction API to get the general document information, which includes FileType, PageCount and FileSize....Viewer Product Solution GroupDocs...various document formats like PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX...
This article explains the ability of the GroupDocs.Redaction API to get the general document information, which includes FileType, PageCount and FileSize....Viewer Product Solution GroupDocs...various document formats like PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX...
This article explains how to apply digital signatures with custom hash algorithms using GroupDocs.Signature API....Viewer Product Solution GroupDocs..."sample.pdf" ; string sampleOutputFilePath = "signed.pdf" ; using...
This article explains how to add document to Spreadsheet via OLE with GroupDocs.Merger within your .NET applications....Viewer Product Solution GroupDocs...spreadsheet. For example, the PDF document can be inserted in the...
This section explains how to load document from stream with GroupDocs.Signature API....Viewer Product Solution GroupDocs...= File . OpenRead ( "sample.pdf" )) { using ( Signature signature...
There might be cases when the document is presented only as a stream (without a copy on the local disk). To avoid the overhead of saving documents to the disk, GroupDocs.Parser enables to extract data from streams directly.
The following example shows how to load the document from the stream:
// Create the stream try (InputStream stream = new FileInputStream(Constants.SamplePdf)) { // Create an instance of Parser class with the stream try (Parser parser = new Parser(stream)) { // Extract a text into the reader try (TextReader reader = parser....Viewer Product Solution GroupDocs...welcome to extract data from PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX...
Sometimes you may need to just remove all or clean metadata properties without applying any filters. The best way to do this is to use the Sanitize method....Viewer Product Solution GroupDocs...with gm . Metadata ( "input.pdf" ) as metadata : affected = metadata...
For all supported image formats the GroupDocs.Metadata API allows extracting common image properties such as width and height, MIME type, byte order, etc. Please see the code snippet below for more information on the feature.
Load an image Extract the root metadata package Use the FileType property to obtain file format information AdvancedUsage.ManagingMetadataForSpecificFormats.Image.ImageReadFileFormatProperties
using (Metadata metadata = new Metadata(Constants.InputPng)) { var root = metadata.GetRootPackage(); Console.WriteLine(root.FileType.FileFormat); Console.WriteLine(root.FileType.ByteOrder); Console.WriteLine(root.FileType.MimeType); Console.WriteLine(root.FileType.Extension); Console.WriteLine(root.FileType.Width); Console.WriteLine(root.FileType.Height); } More resources GitHub examples You may easily run the code above and see the feature in action in our GitHub examples:...Viewer Product Solution GroupDocs...to view and edit metadata of PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX...