Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6541895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:09:38+00:00 2026-05-25T11:09:38+00:00

I’m working on a view in a ASP.NET MVC 2 application. This view will

  • 0

I’m working on a view in a ASP.NET MVC 2 application. This view will contain fixed text but it will also contain text boxes, checkboxes, and perhaps a Telerik Grid that can be updated from a user. ** This form isn’t in a fixed format since there could be a 1…N number of items listed. ** We want to be able to print this view to a PDF. The PDF we want to print off will just look like the view but preferrably it will have just the text from the text boxes and not the text box border. The same goes for the Telerik grid.

How to you recommend I go about doing this? Preferrably I like to see a print button on the view that will directly print it to a PDF. i.e. No secondary window that pops up. That may not be a deal breaker though.

** Update **
Let’s forget about the form elements for a second. Let’s say my view is displayed in the same format that I want in my PDF. How to print that view into a PDF?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:09:39+00:00Added an answer on May 25, 2026 at 11:09 am

    The simplest way to do this is to create a separate Print action that returns a FileResult of a PDF generated on the fly with a library like iTextSharp

    You would not be able to completely reuse the HTML form as is in the PDF document, since you don’t want to use text boxes, but your could generate an HTML view that matches your desired PDF and then use iTextSharp to save that HTML as a PDF.

    Alternatively, you could use the iTextSharp library to build up a PDF from scratch and have much more control, but this might be a bit more difficult.

    From your controller the simplest way to return the PDF without a secondary window is to have your action method return:

    return File(iTextSharpByteArray, "application/pdf", "nameOfFileUserWillDownload.pdf");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.