logger)
+ {
+ _logger = logger;
+ }
+
+ public IActionResult Index()
+ {
+ return View();
+ }
+
+ public IActionResult Privacy()
+ {
+ return View();
+ }
+
+ public IActionResult ExportToPDF()
+ {
+ //Initialize HTML to PDF converter
+ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
+ BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
+ //Set Blink viewport size
+ blinkConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
+ //Assign Blink converter settings to HTML converter
+ htmlConverter.ConverterSettings = blinkConverterSettings;
+ //Convert URL to PDF document
+ PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
+ //Create memory stream
+ MemoryStream stream = new MemoryStream();
+ //Save the document to memory stream
+ document.Save(stream);
+ document.Close();
+ return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
+ }
+
+ [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+ public IActionResult Error()
+ {
+ return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
+ }
+ }
+}
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.csproj b/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.csproj
new file mode 100644
index 0000000..0c720f2
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.user b/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.user
new file mode 100644
index 0000000..72561c2
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/HTML_to_PDF_on_windows_server.user
@@ -0,0 +1,6 @@
+
+
+
+ D:\Feb-1st-2026\HTML_to_PDF_Core 1\HTML_to_PDF_Core\Properties\PublishProfiles\FolderProfile1.pubxml
+
+
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Models/ErrorViewModel.cs b/Windows_Server/HTML_to_PDF_on_windows_server/Models/ErrorViewModel.cs
new file mode 100644
index 0000000..df3cad4
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Models/ErrorViewModel.cs
@@ -0,0 +1,9 @@
+namespace HTML_to_PDF_on_windows_server.Models
+{
+ public class ErrorViewModel
+ {
+ public string? RequestId { get; set; }
+
+ public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+ }
+}
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Program.cs b/Windows_Server/HTML_to_PDF_on_windows_server/Program.cs
new file mode 100644
index 0000000..0727468
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Program.cs
@@ -0,0 +1,27 @@
+var builder = WebApplication.CreateBuilder(args);
+
+// Add services to the container.
+builder.Services.AddControllersWithViews();
+
+var app = builder.Build();
+
+// Configure the HTTP request pipeline.
+if (!app.Environment.IsDevelopment())
+{
+ app.UseExceptionHandler("/Home/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.MapControllerRoute(
+ name: "default",
+ pattern: "{controller=Home}/{action=Index}/{id?}");
+
+app.Run();
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 0000000..b95ffe2
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,15 @@
+
+
+
+
+ false
+ false
+ true
+ Release
+ Any CPU
+ FileSystem
+ D:\Fix-IIS
+ FileSystem
+ <_TargetId>Folder
+
+
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml.user b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml.user
new file mode 100644
index 0000000..93c5ec0
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -0,0 +1,9 @@
+
+
+
+
+ <_PublishTargetUrl>D:\Fix-IIS
+ True|2026-02-24T06:54:24.5923734Z||;
+
+
+
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml
new file mode 100644
index 0000000..b95ffe2
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml
@@ -0,0 +1,15 @@
+
+
+
+
+ false
+ false
+ true
+ Release
+ Any CPU
+ FileSystem
+ D:\Fix-IIS
+ FileSystem
+ <_TargetId>Folder
+
+
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml.user b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml.user
new file mode 100644
index 0000000..e98870d
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/PublishProfiles/FolderProfile1.pubxml.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Properties/launchSettings.json b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/launchSettings.json
new file mode 100644
index 0000000..a0de7be
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Properties/launchSettings.json
@@ -0,0 +1,28 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:21986",
+ "sslPort": 44332
+ }
+ },
+ "profiles": {
+ "HTML_to_PDF_on_windows_server": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "applicationUrl": "https://localhost:7097;http://localhost:5097",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+}
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Index.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Index.cshtml
new file mode 100644
index 0000000..2b5e28f
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Index.cshtml
@@ -0,0 +1,13 @@
+@{
+ ViewData["Title"] = "Home Page";
+}
+
+@{
+ Html.BeginForm("ExportToPDF", "Home", FormMethod.Post);
+ {
+
+
+
+ }
+ Html.EndForm();
+}
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Privacy.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Privacy.cshtml
new file mode 100644
index 0000000..af4fb19
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Home/Privacy.cshtml
@@ -0,0 +1,6 @@
+@{
+ ViewData["Title"] = "Privacy Policy";
+}
+@ViewData["Title"]
+
+Use this page to detail your site's privacy policy.
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/Error.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/Error.cshtml
new file mode 100644
index 0000000..a1e0478
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/Error.cshtml
@@ -0,0 +1,25 @@
+@model ErrorViewModel
+@{
+ ViewData["Title"] = "Error";
+}
+
+Error.
+An error occurred while processing your request.
+
+@if (Model.ShowRequestId)
+{
+
+ Request ID: @Model.RequestId
+
+}
+
+Development Mode
+
+ Swapping to Development environment will display more 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/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_Layout.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_Layout.cshtml
new file mode 100644
index 0000000..50116e3
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_Layout.cshtml
@@ -0,0 +1,49 @@
+
+
+
+
+
+ @ViewData["Title"] - HTML_to_PDF_on_windows_server
+
+
+
+
+
+
+
+
+ @RenderBody()
+
+
+
+
+
+
+
+ @await RenderSectionAsync("Scripts", required: false)
+
+
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_Layout.cshtml.css b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_Layout.cshtml.css
new file mode 100644
index 0000000..a72cbea
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/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/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_ValidationScriptsPartial.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_ValidationScriptsPartial.cshtml
new file mode 100644
index 0000000..5a16d80
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/Shared/_ValidationScriptsPartial.cshtml
@@ -0,0 +1,2 @@
+
+
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewImports.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewImports.cshtml
new file mode 100644
index 0000000..adbfcc0
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewImports.cshtml
@@ -0,0 +1,3 @@
+@using HTML_to_PDF_on_windows_server
+@using HTML_to_PDF_on_windows_server.Models
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewStart.cshtml b/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewStart.cshtml
new file mode 100644
index 0000000..a5f1004
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/Views/_ViewStart.cshtml
@@ -0,0 +1,3 @@
+@{
+ Layout = "_Layout";
+}
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.Development.json b/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.Development.json
new file mode 100644
index 0000000..0c208ae
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.json b/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.json
new file mode 100644
index 0000000..10f68b8
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/Windows_Server/HTML_to_PDF_on_windows_server/dotnet-tools.json b/Windows_Server/HTML_to_PDF_on_windows_server/dotnet-tools.json
new file mode 100644
index 0000000..bffb60c
--- /dev/null
+++ b/Windows_Server/HTML_to_PDF_on_windows_server/dotnet-tools.json
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-ef": {
+ "version": "10.0.3",
+ "commands": [
+ "dotnet-ef"
+ ],
+ "rollForward": false
+ }
+ }
+}
\ No newline at end of file