diff --git a/Redaction/Add Redaction Annotation Programmatically/NuGet.config b/Redaction/Add Redaction Annotation Programmatically/NuGet.config new file mode 100644 index 0000000..7c8896e --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/NuGet.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.csproj b/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.csproj new file mode 100644 index 0000000..dcbd110 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + + + + + + + + diff --git a/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.sln b/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.sln new file mode 100644 index 0000000..67ddc5d --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/PDFViewerSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFViewerSample", "PDFViewerSample.csproj", "{39AA1883-BB43-4C46-9892-6033EA59C990}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5F13CE16-9CC4-4755-AFB4-367F461A209C} + EndGlobalSection +EndGlobal diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml.cs b/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml.cs new file mode 100644 index 0000000..0a23fb0 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Diagnostics; + +namespace PDFViewerSample.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + [IgnoreAntiforgeryToken] + public class ErrorModel : PageModel + { + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } + } +} \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml new file mode 100644 index 0000000..4425226 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml @@ -0,0 +1,127 @@ +@page +@model IndexModel +@{ + ViewData["Title"] = "Redaction programmatic support (All-in-one)"; +} +
+
+ + + + + +
+ + + +
+ + \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml.cs b/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml.cs new file mode 100644 index 0000000..f6cd8ce --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Index.cshtml.cs @@ -0,0 +1,24 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Caching.Memory; +using Syncfusion.EJ2.PdfViewer; +using Newtonsoft.Json; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Reflection; +using System.Net; + +namespace PDFViewerSample.Pages +{ + [IgnoreAntiforgeryToken(Order = 1001)] + public class IndexModel : PageModel + { + + private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment; + private IMemoryCache _cache; + + public IndexModel(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment, IMemoryCache cache) + { + _hostingEnvironment = hostingEnvironment; + _cache = cache; + } + } +} \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml new file mode 100644 index 0000000..46ba966 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml @@ -0,0 +1,8 @@ +@page +@model PrivacyModel +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml.cs b/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml.cs new file mode 100644 index 0000000..f9a85a1 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace PDFViewerSample.Pages +{ + public class PrivacyModel : PageModel + { + private readonly ILogger _logger; + + public PrivacyModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml new file mode 100644 index 0000000..fc991f4 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml @@ -0,0 +1,51 @@ + + + + + + @ViewData["Title"] - PDFViewerSample + + + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2022 - PDFViewerSample - Privacy +
+
+ + @await RenderSectionAsync("Scripts", required: false) + + + + \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml.css b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..a72cbea --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_ValidationScriptsPartial.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5a16d80 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewImports.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..51b8015 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using PDFViewerSample +@namespace PDFViewerSample.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Syncfusion.EJ2 \ No newline at end of file diff --git a/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewStart.cshtml b/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Pages/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/Redaction/Add Redaction Annotation Programmatically/Program.cs b/Redaction/Add Redaction Annotation Programmatically/Program.cs new file mode 100644 index 0000000..bc275e4 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorPages(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapRazorPages(); + +app.Run(); diff --git a/Redaction/Add Redaction Annotation Programmatically/Properties/launchSettings.json b/Redaction/Add Redaction Annotation Programmatically/Properties/launchSettings.json new file mode 100644 index 0000000..d52972e --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:38233", + "sslPort": 44357 + } + }, + "profiles": { + "PDFViewerSample": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7173;http://localhost:5173", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Redaction/Add Redaction Annotation Programmatically/README.md b/Redaction/Add Redaction Annotation Programmatically/README.md new file mode 100644 index 0000000..30d532e --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/README.md @@ -0,0 +1,26 @@ +# Create a simple PDF Viewer +This example shows how to create a simple PDF Viewer application. + +## Project pre-requisites +One of the the following .NET SDK is required to develop and run the Syncfusion® UI controls for ASP.NET Core application. + +* NET 6.0 SDK +* NET 5.0 SDK +* NET Core SDK 3.1 +* NET Core SDK 2.0 +* NET 4.5 Framework + +If you are planning to use Visual Studio to develop ASP.NET Core Applications. + +.NET 6.0 requires Visual Studio 2022 17.0 or later. +.NET 5.0 requires Visual Studio 2019 16.8 or later. +.NET Core SDK 3.1 requires Visual Studio 2019 16.4 or later. +.NET Core SDK 2.0 requires Visual Studio 2017 15.7 or later. +.NET 4.5 Framework requires Visual Studio 2015 20.1 or later + +## Running the sample +Execute the following commands to run the sample via command prompt window. + +* dotnet restore +* dotnet run + diff --git a/Redaction/Add Redaction Annotation Programmatically/appsettings.Development.json b/Redaction/Add Redaction Annotation Programmatically/appsettings.Development.json new file mode 100644 index 0000000..770d3e9 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Redaction/Add Redaction Annotation Programmatically/appsettings.json b/Redaction/Add Redaction Annotation Programmatically/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Redaction/Add Redaction Annotation Programmatically/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Redaction/Add Redaction Annotation Programmatically/wwwroot/favicon.ico b/Redaction/Add Redaction Annotation Programmatically/wwwroot/favicon.ico new file mode 100644 index 0000000..63e859b Binary files /dev/null and b/Redaction/Add Redaction Annotation Programmatically/wwwroot/favicon.ico differ diff --git a/Redaction/Search Text and Redact/NuGet.config b/Redaction/Search Text and Redact/NuGet.config new file mode 100644 index 0000000..7c8896e --- /dev/null +++ b/Redaction/Search Text and Redact/NuGet.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Redaction/Search Text and Redact/PDFViewerSample.csproj b/Redaction/Search Text and Redact/PDFViewerSample.csproj new file mode 100644 index 0000000..dcbd110 --- /dev/null +++ b/Redaction/Search Text and Redact/PDFViewerSample.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + + + + + + + + diff --git a/Redaction/Search Text and Redact/PDFViewerSample.sln b/Redaction/Search Text and Redact/PDFViewerSample.sln new file mode 100644 index 0000000..67ddc5d --- /dev/null +++ b/Redaction/Search Text and Redact/PDFViewerSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFViewerSample", "PDFViewerSample.csproj", "{39AA1883-BB43-4C46-9892-6033EA59C990}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5F13CE16-9CC4-4755-AFB4-367F461A209C} + EndGlobalSection +EndGlobal diff --git a/Redaction/Search Text and Redact/Pages/Error.cshtml b/Redaction/Search Text and Redact/Pages/Error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Redaction/Search Text and Redact/Pages/Error.cshtml.cs b/Redaction/Search Text and Redact/Pages/Error.cshtml.cs new file mode 100644 index 0000000..0a23fb0 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Diagnostics; + +namespace PDFViewerSample.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + [IgnoreAntiforgeryToken] + public class ErrorModel : PageModel + { + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } + } +} \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/Index.cshtml b/Redaction/Search Text and Redact/Pages/Index.cshtml new file mode 100644 index 0000000..4c33cd8 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Index.cshtml @@ -0,0 +1,79 @@ +@page +@model IndexModel +@{ + ViewData["Title"] = "Search text and redact"; +} +
+
+ + +
+ + + +
+ \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/Index.cshtml.cs b/Redaction/Search Text and Redact/Pages/Index.cshtml.cs new file mode 100644 index 0000000..f6cd8ce --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Index.cshtml.cs @@ -0,0 +1,24 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Caching.Memory; +using Syncfusion.EJ2.PdfViewer; +using Newtonsoft.Json; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Reflection; +using System.Net; + +namespace PDFViewerSample.Pages +{ + [IgnoreAntiforgeryToken(Order = 1001)] + public class IndexModel : PageModel + { + + private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment; + private IMemoryCache _cache; + + public IndexModel(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment, IMemoryCache cache) + { + _hostingEnvironment = hostingEnvironment; + _cache = cache; + } + } +} \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/Privacy.cshtml b/Redaction/Search Text and Redact/Pages/Privacy.cshtml new file mode 100644 index 0000000..46ba966 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Privacy.cshtml @@ -0,0 +1,8 @@ +@page +@model PrivacyModel +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Redaction/Search Text and Redact/Pages/Privacy.cshtml.cs b/Redaction/Search Text and Redact/Pages/Privacy.cshtml.cs new file mode 100644 index 0000000..f9a85a1 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace PDFViewerSample.Pages +{ + public class PrivacyModel : PageModel + { + private readonly ILogger _logger; + + public PrivacyModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml b/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml new file mode 100644 index 0000000..fc991f4 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml @@ -0,0 +1,51 @@ + + + + + + @ViewData["Title"] - PDFViewerSample + + + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2022 - PDFViewerSample - Privacy +
+
+ + @await RenderSectionAsync("Scripts", required: false) + + + + \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml.css b/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..a72cbea --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Redaction/Search Text and Redact/Pages/Shared/_ValidationScriptsPartial.cshtml b/Redaction/Search Text and Redact/Pages/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5a16d80 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Redaction/Search Text and Redact/Pages/_ViewImports.cshtml b/Redaction/Search Text and Redact/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..51b8015 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using PDFViewerSample +@namespace PDFViewerSample.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Syncfusion.EJ2 \ No newline at end of file diff --git a/Redaction/Search Text and Redact/Pages/_ViewStart.cshtml b/Redaction/Search Text and Redact/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Redaction/Search Text and Redact/Pages/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/Redaction/Search Text and Redact/Program.cs b/Redaction/Search Text and Redact/Program.cs new file mode 100644 index 0000000..bc275e4 --- /dev/null +++ b/Redaction/Search Text and Redact/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorPages(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapRazorPages(); + +app.Run(); diff --git a/Redaction/Search Text and Redact/Properties/launchSettings.json b/Redaction/Search Text and Redact/Properties/launchSettings.json new file mode 100644 index 0000000..d52972e --- /dev/null +++ b/Redaction/Search Text and Redact/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:38233", + "sslPort": 44357 + } + }, + "profiles": { + "PDFViewerSample": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7173;http://localhost:5173", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Redaction/Search Text and Redact/README.md b/Redaction/Search Text and Redact/README.md new file mode 100644 index 0000000..30d532e --- /dev/null +++ b/Redaction/Search Text and Redact/README.md @@ -0,0 +1,26 @@ +# Create a simple PDF Viewer +This example shows how to create a simple PDF Viewer application. + +## Project pre-requisites +One of the the following .NET SDK is required to develop and run the Syncfusion® UI controls for ASP.NET Core application. + +* NET 6.0 SDK +* NET 5.0 SDK +* NET Core SDK 3.1 +* NET Core SDK 2.0 +* NET 4.5 Framework + +If you are planning to use Visual Studio to develop ASP.NET Core Applications. + +.NET 6.0 requires Visual Studio 2022 17.0 or later. +.NET 5.0 requires Visual Studio 2019 16.8 or later. +.NET Core SDK 3.1 requires Visual Studio 2019 16.4 or later. +.NET Core SDK 2.0 requires Visual Studio 2017 15.7 or later. +.NET 4.5 Framework requires Visual Studio 2015 20.1 or later + +## Running the sample +Execute the following commands to run the sample via command prompt window. + +* dotnet restore +* dotnet run + diff --git a/Redaction/Search Text and Redact/appsettings.Development.json b/Redaction/Search Text and Redact/appsettings.Development.json new file mode 100644 index 0000000..770d3e9 --- /dev/null +++ b/Redaction/Search Text and Redact/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Redaction/Search Text and Redact/appsettings.json b/Redaction/Search Text and Redact/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Redaction/Search Text and Redact/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Redaction/Search Text and Redact/wwwroot/favicon.ico b/Redaction/Search Text and Redact/wwwroot/favicon.ico new file mode 100644 index 0000000..63e859b Binary files /dev/null and b/Redaction/Search Text and Redact/wwwroot/favicon.ico differ diff --git a/Redaction/Show and Hide Redaction Toolbar/NuGet.config b/Redaction/Show and Hide Redaction Toolbar/NuGet.config new file mode 100644 index 0000000..7c8896e --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/NuGet.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.csproj b/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.csproj new file mode 100644 index 0000000..dcbd110 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + + + + + + + + diff --git a/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.sln b/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.sln new file mode 100644 index 0000000..67ddc5d --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/PDFViewerSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFViewerSample", "PDFViewerSample.csproj", "{39AA1883-BB43-4C46-9892-6033EA59C990}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39AA1883-BB43-4C46-9892-6033EA59C990}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5F13CE16-9CC4-4755-AFB4-367F461A209C} + EndGlobalSection +EndGlobal diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml.cs b/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml.cs new file mode 100644 index 0000000..0a23fb0 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Diagnostics; + +namespace PDFViewerSample.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + [IgnoreAntiforgeryToken] + public class ErrorModel : PageModel + { + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILogger _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } + } +} \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml new file mode 100644 index 0000000..4525a9a --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml @@ -0,0 +1,40 @@ +@page +@model IndexModel +@{ + ViewData["Title"] = "Search text and redact"; +} +
+ +
+ + +
+ + +
+ \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml.cs b/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml.cs new file mode 100644 index 0000000..f6cd8ce --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Index.cshtml.cs @@ -0,0 +1,24 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Caching.Memory; +using Syncfusion.EJ2.PdfViewer; +using Newtonsoft.Json; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Reflection; +using System.Net; + +namespace PDFViewerSample.Pages +{ + [IgnoreAntiforgeryToken(Order = 1001)] + public class IndexModel : PageModel + { + + private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment; + private IMemoryCache _cache; + + public IndexModel(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment, IMemoryCache cache) + { + _hostingEnvironment = hostingEnvironment; + _cache = cache; + } + } +} \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml new file mode 100644 index 0000000..46ba966 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml @@ -0,0 +1,8 @@ +@page +@model PrivacyModel +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml.cs b/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml.cs new file mode 100644 index 0000000..f9a85a1 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace PDFViewerSample.Pages +{ + public class PrivacyModel : PageModel + { + private readonly ILogger _logger; + + public PrivacyModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml new file mode 100644 index 0000000..fc991f4 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml @@ -0,0 +1,51 @@ + + + + + + @ViewData["Title"] - PDFViewerSample + + + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2022 - PDFViewerSample - Privacy +
+
+ + @await RenderSectionAsync("Scripts", required: false) + + + + \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml.css b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..a72cbea --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_ValidationScriptsPartial.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5a16d80 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewImports.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..51b8015 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using PDFViewerSample +@namespace PDFViewerSample.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Syncfusion.EJ2 \ No newline at end of file diff --git a/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewStart.cshtml b/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Pages/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/Redaction/Show and Hide Redaction Toolbar/Program.cs b/Redaction/Show and Hide Redaction Toolbar/Program.cs new file mode 100644 index 0000000..bc275e4 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorPages(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapRazorPages(); + +app.Run(); diff --git a/Redaction/Show and Hide Redaction Toolbar/Properties/launchSettings.json b/Redaction/Show and Hide Redaction Toolbar/Properties/launchSettings.json new file mode 100644 index 0000000..d52972e --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:38233", + "sslPort": 44357 + } + }, + "profiles": { + "PDFViewerSample": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7173;http://localhost:5173", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Redaction/Show and Hide Redaction Toolbar/README.md b/Redaction/Show and Hide Redaction Toolbar/README.md new file mode 100644 index 0000000..30d532e --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/README.md @@ -0,0 +1,26 @@ +# Create a simple PDF Viewer +This example shows how to create a simple PDF Viewer application. + +## Project pre-requisites +One of the the following .NET SDK is required to develop and run the Syncfusion® UI controls for ASP.NET Core application. + +* NET 6.0 SDK +* NET 5.0 SDK +* NET Core SDK 3.1 +* NET Core SDK 2.0 +* NET 4.5 Framework + +If you are planning to use Visual Studio to develop ASP.NET Core Applications. + +.NET 6.0 requires Visual Studio 2022 17.0 or later. +.NET 5.0 requires Visual Studio 2019 16.8 or later. +.NET Core SDK 3.1 requires Visual Studio 2019 16.4 or later. +.NET Core SDK 2.0 requires Visual Studio 2017 15.7 or later. +.NET 4.5 Framework requires Visual Studio 2015 20.1 or later + +## Running the sample +Execute the following commands to run the sample via command prompt window. + +* dotnet restore +* dotnet run + diff --git a/Redaction/Show and Hide Redaction Toolbar/appsettings.Development.json b/Redaction/Show and Hide Redaction Toolbar/appsettings.Development.json new file mode 100644 index 0000000..770d3e9 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Redaction/Show and Hide Redaction Toolbar/appsettings.json b/Redaction/Show and Hide Redaction Toolbar/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Redaction/Show and Hide Redaction Toolbar/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Redaction/Show and Hide Redaction Toolbar/wwwroot/favicon.ico b/Redaction/Show and Hide Redaction Toolbar/wwwroot/favicon.ico new file mode 100644 index 0000000..63e859b Binary files /dev/null and b/Redaction/Show and Hide Redaction Toolbar/wwwroot/favicon.ico differ