GroupDocs.Parser for .NET 24.2 Release Notes
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
PARSERNET-1928 | Implement the ability to load files by URL | Feature |
PARSERNET-2254 | Implement two NuGet packages | Improvement |
Public API and Backward Incompatible Changes
Implement two NuGet packages
Starting with this version, GroupDocs.Parser is divided into two packages - for .NET Framework and .NET Standard. GroupDocs.Parser for .NET Framework package is recommended for using with .NET Framework projects. GroupDocs.Parser package is designed to work with .NET projects. You need to configure binding redirection to make it work with .NET Framework. For regular .NET Framework project it’s required to enable automatic binding redirection. For unit tests projects you also need to specify GenerateBindingRedirectsOutputType
in the project file:
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
Implement the ability to load files by URL
Description
This feature provides the ability to load documents from URL instead of a file on disk or a stream.
Public API changes
Parser public class was updated with changes as follows:
- Added Parser(Uri) constructor;
- Added Parser(Uri, LoadOptions) constructor;
- Added Parser(Uri, ParserSettings) constructor;
- Added Parser(Uri, LoadOptions, ParserSettings) constructor.
LoadOptions public class was updated with changes as follows:
- Added LoadOptions(TimeSpan) constructor;
- Added LoadOptions(FileFormat, string, Encoding, Encoding, TimeSpan) constructor;
- Added Timeout property.
Usage
The following example shows how to load the document from the url:
// Create an instance of Parser class with the url
using (Parser parser = new Parser(url))
{
// Extract a text into the reader
using (TextReader reader = parser.GetText())
{
// Print a text from the document
// If text extraction isn't supported, a reader is null
Console.WriteLine(reader == null ? "Text extraction isn't supported" : reader.ReadToEnd());
}
}