Added support for advanced annotation tools, including signature and stamp management, along with accessibility improvements. Introduced WebAssembly binaries (`qcms_bg.wasm`, `quickjs-eval.wasm`, `openjpeg.wasm`, `jbig2.wasm`) for enhanced performance in color management, JavaScript execution, and image decoding. Implemented a JavaScript fallback (`openjpeg_nowasm_fallback.js`) for environments without WebAssembly support. Updated `Details.cshtml` to include a PDF viewer popup and added a new Razor Page (`ViewPdf.cshtml`) for secure PDF file access. Registered `.mjs` MIME type in `Program.cs` for PDF.js compatibility. Enhanced localization with translations for multiple languages in `viewer.ftl` and added new icons, dialogs, and accessibility features. Updated `DXApp.sln` to include a new project for template management. These changes improve functionality, modularity, and user experience.
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using DXApp.TemplateKitProject.Data;
|
|
using DXApp.TemplateKitProject.Services;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddRazorPages();
|
|
|
|
// Datenbank
|
|
var connectionString = builder.Configuration.GetConnectionString("EcmContext")
|
|
?? throw new InvalidOperationException("Connection string 'EcmContext' not found.");
|
|
builder.Services.AddDbContext<AppDbContext>(options =>
|
|
options.UseSqlServer(connectionString));
|
|
|
|
// Services
|
|
builder.Services.AddScoped<PdfAttachmentExtractorService>();
|
|
builder.Services.AddScoped<PdfResultPackageService>();
|
|
builder.Services.AddScoped<ZugferdExtractorService>();
|
|
builder.Services.AddScoped<ZugferdParserService>();
|
|
builder.Services.AddScoped<ZugferdImportService>();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Error");
|
|
app.UseHsts();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
// .mjs MIME-Type für PDF.js registrieren (einmaliger UseStaticFiles-Aufruf)
|
|
var provider = new Microsoft.AspNetCore.StaticFiles.FileExtensionContentTypeProvider();
|
|
provider.Mappings[".mjs"] = "text/javascript";
|
|
app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });
|
|
|
|
app.UseRouting();
|
|
app.UseAuthorization();
|
|
app.MapRazorPages();
|
|
app.Run(); |