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

  • Home
  • SEARCH
  • 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 8941969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:25:19+00:00 2026-06-15T11:25:19+00:00

My project is almost done, and thanks to stackoverflow. Now that I have managed

  • 0

My project is almost done, and thanks to stackoverflow. Now that I have managed to capture Users details and their certificates, I am looking for a way to generate pdf which I will send to those who passed.

I am not looking for the code at the moment. I have an asp.net mvc 3 application which shows Certificates details for my students. Now I want the certificates to be generated then sent by email, all this automated.

First I would like help on how I can generate a pdf from database values and sending the generated pdf wont be a problem.

  • 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-06-15T11:25:20+00:00Added an answer on June 15, 2026 at 11:25 am

    Using iTextSharp, this code will create and serve a PDF:

    public FileStreamResult DownloadPDF()
    {
            MemoryStream workStream = new MemoryStream();
    
            using(Document document = new Document())
            {
                PdfWriter.GetInstance(document, workStream).CloseStream = false;
    
                document.Open();
    
                document.SetPageSize(PageSize.LETTER);
                document.SetMargins(12, 12, 8, 7);
                document.NewPage();
    
                // Create a new Paragraph object with the text, "Hello, World!"
                var welcomeParagraph = new Paragraph("Hello, World!");
    
                // Add the Paragraph object to the document
                document.Add(welcomeParagraph);
    
                // This is where your data would go
    
                document.Close();
            }
            workStream.Position = 0;
    
            FileStreamResult fileResult = new FileStreamResult(workStream, "application/pdf");
            fileResult.FileDownloadName = "test.pdf";
    
            return fileResult;
        }
    

    For more information see Creating PDF Documents with ASP.NET and iTextSharp

    There are a lot of tutorials online, but this should get you started.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a command line tool. I have my project almost done, but now
I am almost done with my project, but have one final looming problem that
I have a project that I am almost done with. One thing left that
In almost all of my projects I have few files that are project wide
I'm almost done coding my project and I have come across 1 to 2
I'm currently working on a project (that's almost done :D) but I've run into
I'm almost done with my project :) i want to scroll the page to
I am developing an application using opencv as my college project, it's almost done
I have been working on a huge project for work for a while now,
I have a project for a course, I did almost everything but I have

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.