Working with Common Utilities
Following are some common properties, methods and utilities used in all GroupDocs.Metadata API examples.
Following are some common properties used in all examples.
Following code applies product license.
Using Dynabic.Metered Account
GroupDocs.Metadata for .NET also allows its users to use Dynabic.Metered account to run the library in licensed mode. It works only with enabled internet connection.
Following code snippet shows how to use Dynabic.Metered account
Map Source File Path
Following code maps source folder to access input file:
Map Destination File Path
Following code maps destination folder to save output file:
File Format Recognizer
GroupDocs.Metadata API provides an additional functionality of file format recognition. Following is function recognizes the format of files in a directory.
Exception handling is a good practice in writing quality code. GroupDocs.Metadata API may throw some exceptions such as:
- InvalidFormatException: occurs when invalid file format is used.
Following is a code example to catch invalid format exception.