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:
@@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace DXApp.TemplateKitProject.Pages.Invoices;
|
||||
|
||||
public class DocumentViewerModel : PageModel
|
||||
{
|
||||
[BindProperty(SupportsGet = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string PdfUrl => $"/Invoices/ViewPdf?id={Id}";
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
// Keine serverseitige Logik nötig für die erste Version.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user