-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated demo projects and pakcage versions * Updated links and removed not used file
- Loading branch information
1 parent
5646b94
commit 9380260
Showing
451 changed files
with
12,147 additions
and
9,697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
![Alt text](https://raw.githubusercontent.com/groupdocs-viewer/groupdocs-viewer.github.io/master/resources/image/banner.png "GroupDocs.Viewer") | ||
|
||
# GroupDocs.Viewer for .NET ASP.NET MVC Demo | ||
|
||
![GitHub](https://img.shields.io/github/license/groupdocs-viewer/GroupDocs.Viewer-for-.NET) | ||
|
||
In order to demonstrate [GroupDocs.Viewer for .NET](https://products.groupdocs.com/viewer/net) reach and powerful features we prepared **document viewer** demo. Which can be used as a standalone application or easily integrated into your project. | ||
|
||
## System Requirements | ||
- .NET Framework 4.8 | ||
- Visual Studio 2022 | ||
|
||
## Supported Document Formats | ||
|
||
GroupDocs.Viewer for .NET enables you to render Microsoft Word, Microsoft Excel, Microsoft PowerPoint, and many more file types in HTML, PDF, PNG, and JPEG formats. The complete list of the supported document and file formats can be found in the [Supported document formats](https://docs.groupdocs.com/viewer/net/supported-document-formats/) documentation article. | ||
|
||
## Demo Video | ||
|
||
<p align="center"> | ||
<a title="Document viewer for JAVA " href="https://www.youtube.com/watch?v=NnZaMNUC6o0"> | ||
<img src="https://raw.githubusercontent.com/groupdocs-viewer/groupdocs-viewer.github.io/master/resources/image/document-viewer-demo.gif" width="100%" style="width:100%;"> | ||
</a> | ||
</p> | ||
|
||
## Features | ||
- Responsive design | ||
- Fully customizable navigation panel & thumbnails | ||
- Text searching & highlighting | ||
- Download & upload documents | ||
- Print document as PDF | ||
- Zoom in/out documents without quality loss in HTML mode | ||
- Smooth page navigation & scrolling | ||
- Preload pages for faster document rendering | ||
- Multi-language support | ||
|
||
## How To Run | ||
|
||
Download the [source code](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/archive/master.zip) from github or clone this repository: | ||
|
||
```bash | ||
git clone https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET | ||
``` | ||
|
||
Navigate to `Demos\ASP.NET MVC\src` and open `GroupDocs.Viewer.AspNetMvc.sln` in Visual Studio. Build and run the project. | ||
|
||
Open the app by navigating to <http://localhost:8080> in your favorite browser. | ||
|
||
## Configuration | ||
|
||
You can configure this demo project in [Global.asax.cs](./src/Global.asax.cs) file in `ConfigureServices` method which includes configuration for GroupDocs.Viewer and UI. | ||
|
||
NOTE: without a license application will run in trial mode, [purchase a license](https://purchase.groupdocs.com/buy) or [request a temporary license](https://purchase.groupdocs.com/temporary-license). | ||
|
||
## License | ||
|
||
The MIT License (MIT). | ||
|
||
Please have a look at the [LICENSE](LICENSE) for more details | ||
|
||
## More Demo Projects | ||
|
||
- [Java Dropwizard Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java/tree/master/Demos/Dropwizard) | ||
- [Java Spring Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java/tree/master/Demos/Spring) | ||
- [ASP.NET Core Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/tree/master/Demos/ASP.NET%20Core) | ||
- [ASP.NET Web Forms Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/tree/master/Demos/ASP.NET%20Web%20Forms) | ||
- [Windows Forms Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/tree/master/Demos/Windows%20Forms) | ||
- [WPF Demo](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/tree/master/Demos/WPF) | ||
|
||
[Home](https://www.groupdocs.com/) | [Product Page](https://products.groupdocs.com/viewer/net) | [Documentation](https://docs.groupdocs.com/viewer/net/) | [Demo](https://products.groupdocs.app/viewer/total) | [API Reference](https://apireference.groupdocs.com/net/viewer) | [Examples](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/tree/master/Examples) | [Blog](https://blog.groupdocs.com/category/viewer/) | [Free Support](https://forum.groupdocs.com/c/viewer) | [Temporary License](https://purchase.groupdocs.com/temporary-license) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Net.Http.Headers; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.Web.Http; | ||
|
||
namespace GroupDocs.Viewer.AspNetMvc.ActionResults | ||
{ | ||
internal class FileActionResult : IHttpActionResult | ||
{ | ||
private readonly byte[] _data; | ||
private readonly string _fileName; | ||
private readonly string _contentType; | ||
readonly HttpRequestMessage _request; | ||
|
||
public FileActionResult(byte[] data, string fileName, string contentType, | ||
HttpRequestMessage request) | ||
{ | ||
_data = data; | ||
_fileName = fileName; | ||
_contentType = contentType; | ||
_request = request; | ||
} | ||
|
||
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken) | ||
{ | ||
var response = new HttpResponseMessage | ||
{ | ||
Content = new ByteArrayContent(_data), | ||
StatusCode = HttpStatusCode.OK, | ||
RequestMessage = _request | ||
}; | ||
|
||
var contentType = string.IsNullOrEmpty(_contentType) | ||
? "application/octet-stream" | ||
: _contentType; | ||
|
||
response.Content.Headers.ContentType = | ||
new MediaTypeHeaderValue(contentType); | ||
response.Content.Headers.ContentDisposition = | ||
new ContentDispositionHeaderValue("attachment") | ||
{ | ||
FileName = _fileName | ||
}; | ||
|
||
return Task.FromResult(response); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.Web.Http; | ||
using Newtonsoft.Json; | ||
|
||
namespace GroupDocs.Viewer.AspNetMvc.ActionResults | ||
{ | ||
internal class JsonActionResult : IHttpActionResult | ||
{ | ||
readonly object _value; | ||
public HttpStatusCode StatusCode { get; set; } = HttpStatusCode.OK; | ||
|
||
readonly HttpRequestMessage _request; | ||
|
||
public JsonActionResult(object value, HttpRequestMessage request) | ||
{ | ||
_value = value; | ||
_request = request; | ||
} | ||
|
||
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken) | ||
{ | ||
var json = JsonConvert.SerializeObject(_value, Formatting.Indented); | ||
var content = new StringContent(json, Encoding.UTF8, "application/json"); | ||
|
||
var response = new HttpResponseMessage | ||
{ | ||
Content = content, | ||
StatusCode = StatusCode, | ||
RequestMessage = _request | ||
}; | ||
|
||
return Task.FromResult(response); | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Demos/ASP.NET MVC/src/ActionResults/ResourceActionResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Net.Http.Headers; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.Web.Http; | ||
|
||
namespace GroupDocs.Viewer.AspNetMvc.ActionResults | ||
{ | ||
internal class ResourceActionResult : IHttpActionResult | ||
{ | ||
private readonly byte[] _data; | ||
private readonly string _contentType; | ||
readonly HttpRequestMessage _request; | ||
|
||
public ResourceActionResult(byte[] data, string contentType, HttpRequestMessage request) | ||
{ | ||
_data = data; | ||
_contentType = contentType; | ||
_request = request; | ||
} | ||
|
||
public Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken) | ||
{ | ||
var response = new HttpResponseMessage | ||
{ | ||
Content = new ByteArrayContent(_data), | ||
StatusCode = HttpStatusCode.OK, | ||
RequestMessage = _request | ||
}; | ||
|
||
response.Content.Headers.ContentType = | ||
new MediaTypeHeaderValue(_contentType); | ||
response.Content.Headers.ContentDisposition | ||
= new ContentDispositionHeaderValue("inline"); | ||
|
||
return Task.FromResult(response); | ||
} | ||
} | ||
} |
38 changes: 19 additions & 19 deletions
38
Demos/MVC/src/App_Start/RouteConfig.cs → .../ASP.NET MVC/src/App_Start/RouteConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
using System.Web.Mvc; | ||
using System.Web.Routing; | ||
|
||
namespace GroupDocs.Viewer.MVC | ||
{ | ||
public class RouteConfig | ||
{ | ||
public static void RegisterRoutes(RouteCollection routes) | ||
{ | ||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | ||
|
||
routes.MapRoute( | ||
name: "Default", | ||
url: "{controller}/{action}/{id}", | ||
defaults: new { controller = "Viewer", action = "Index", id = UrlParameter.Optional } | ||
); | ||
} | ||
} | ||
} | ||
using System.Web.Mvc; | ||
using System.Web.Routing; | ||
|
||
namespace GroupDocs.Viewer.AspNetMvc | ||
{ | ||
public class RouteConfig | ||
{ | ||
public static void RegisterRoutes(RouteCollection routes) | ||
{ | ||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | ||
|
||
routes.MapRoute( | ||
name: "Default", | ||
url: "{controller}/{action}/{id}", | ||
defaults: new { controller = "Viewer", action = "Index", id = UrlParameter.Optional } | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Web.Http; | ||
|
||
namespace GroupDocs.Viewer.AspNetMvc | ||
{ | ||
public static class WebApiConfig | ||
{ | ||
public static void Register(HttpConfiguration config) | ||
{ | ||
config.EnableCors(); | ||
config.MapHttpAttributeRoutes(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
|
||
# For the full list of supported browsers by the Angular framework, please see: | ||
# https://angular.io/guide/browser-support | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
last 1 Chrome version | ||
last 1 Firefox version | ||
last 2 Edge major versions | ||
last 2 Safari major versions | ||
last 2 iOS major versions | ||
Firefox ESR | ||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# GroupdocsViewerUI | ||
|
||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.3. | ||
|
||
## Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Code scaffolding | ||
|
||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. | ||
|
||
## Build | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. | ||
|
||
## Further help | ||
|
||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. |
Oops, something went wrong.