Detecting the version of a PDF document The following sample of code will help you to detect the PDF version a loaded document and extract some additional file format information.
Load a PDF document Extract the root metadata package Use the FileType property to obtain file format information AdvancedUsage.ManagingMetadataForSpecificFormats.Document.Pdf.PdfReadFileFormatProperties
using (Metadata metadata = new Metadata(Constants.InputPdf)) { var root = metadata.GetRootPackage(); Console.WriteLine(root.FileType.FileFormat); Console.WriteLine(root.FileType.Version); Console.WriteLine(root.FileType.MimeType); Console.WriteLine(root.FileType.Extension); } Reading built-in metadata properties To access built-in metadata of a PDF document, please use the DocumentProperties property defined in the DocumentRootPackage class....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
This topic describes how to use the GroupDocs.Viewer and Node.js to convert Word documents to HTML, PDF, PNG, and JPEG formats....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
This article explains how to merge arbitrary pages from different documents into a single PDF, DOCX, Excel or PowerPoint document using GroupDocs.Merger for .NET....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
This article explains how to access EXIF metadata in a file of any supported format....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
This topic describes how to use the GroupDocs.Viewer Java API to convert Outlook data files (PST and OST) to HTML, PDF, PNG, and JPEG formats....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
Render files, list and save attachments in any supported format using GroupDocs.Viewer for Python via .NET to experience its simplicity and power in Python....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
This article explains how to sign document with Text electronic signatures using extended options with GroupDocs.Signature API....Close Navigation Products GroupDocs.Total Product Family GroupDocs...
Detecting the version of a PDF document The following sample of code will help you to detect the PDF version a loaded document and extract some additional file format information.
Load a PDF document Extract the root metadata package Use the getPdfType method to obtain file format information advanced_usage.managing_metadata_for_specific_formats.document.pdf.PdfReadFileFormatProperties
try (Metadata metadata = new Metadata(Constants.InputPdf)) { PdfRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getPdfType().getFileFormat()); System.out.println(root.getPdfType().getVersion()); System.out.println(root.getPdfType().getMimeType()); System.out.println(root.getPdfType().getExtension()); } Reading built-in metadata properties To access built-in metadata of a PDF document, please use the getDocumentProperties method defined in the DocumentRootPackage class....Close Navigation Products GroupDocs.Total Product Family GroupDocs...