Enhance PDF viewing experience with new document viewer

- Replaced button in `Details.cshtml` with a link to a new document viewer page.
- Created `DocumentViewer.cshtml` to display PDFs using an iframe, with a back button and a link to an experimental DevExpress viewer.
- Introduced `DocumentViewerModel` in `DocumentViewer.cshtml.cs` for handling invoice ID and PDF URL.
- Updated `OnGetAsync` in `ViewPdf.cshtml.cs` to set `Content-Disposition` to inline for better PDF rendering in the browser.
This commit is contained in:
OlgunR
2026-06-08 16:59:57 +02:00
parent b515b4f523
commit 1cc617de42
4 changed files with 58 additions and 5 deletions

View File

@@ -16,10 +16,10 @@
@if (!string.IsNullOrEmpty(Model.Invoice?.ResultFilePath))
{
<button class="btn btn-primary mb-3 ms-2"
onclick="openPdfViewer(@Model.Invoice.Id)">
<a class="btn btn-primary mb-3 ms-2"
href="/Invoices/DocumentViewer?id=@Model.Invoice.Id">
<i class="dx-icon-pdffile"></i> Ergebnis anzeigen
</button>
</a>
}
@if (Model.Invoice is null)