C#C
C#2y ago
Genti

CSHTML form to PDF File.

So i have some form in my cshtml view that saves all the data correctly inside the corresponding model, and i need to get these input data and display them inside a pdf file. I tried using QuestPDF, DinkToPDF and BouncyCastle methods and none really worked.

This is the project : "https://github.com/GentiOsmani/DeklarimiPasurise"

So the forms are filled inside this directory : "DeklarimiPasuris>Views>Declare>Create.cshtml".

They Are saved at this directory : "DeklarimiPasuris>Models>DeclarationModel".

And they are shown at this directory: "DeklarimiPasuris>Views>Declare>Details.cshtml".

The pdf should download when this button is clicked : "<td><a class="btn btn-primary" asp-action="DownloadPdf" asp-controller="Declare">Shkarko</a></td>" (line 38),
Inside of this directory : "DeklarimiPasuris>Views>Declare>Index.cshtml".

If someone could help me it would be a blessing.
Best Regards, Genti.
Was this page helpful?