© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
10 replies
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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Convert cshtml view to PDF file
C#CC# / help
3y ago
✅ cshtml file System.NullReferenceException
C#CC# / help
3y ago
asp net cshtml javascript file
C#CC# / help
4y ago
how to get html element in .cshtml file
C#CC# / help
4y ago