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 6047265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:19:55+00:00 2026-05-23T07:19:55+00:00

i am designing a asp.net mvc project. i want to convert my document into

  • 0

i am designing a asp.net mvc project. i want to convert my document into pdf.
i am using itextsharp-all-5.1.1 for this conversion.

i created object as

PdfWriter.GetInstance(doc, new FileStream((Request.PhysicalApplicationPath + "\\1.pdf"), FileMode.Create));

now i want to add the result of following query in doc object, so how can i add the result of this queryin doc object.

i have this query:-

var vv= (from x in db.RawMaterial join y in db.ProductFormulation on x.ID equals y.RawMaterialID where y.ProductID == 1 select new { x.Description, y.Quantity });

please help me please…

  • 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-23T07:19:55+00:00Added an answer on May 23, 2026 at 7:19 am

    So, if I understand you correctly you are creating a PDF file using itextsharp and you want to add to this pdf file the result of some query which is a collection of some item that contains a description and a quantity.

    If this is the case I wonder why your question is tagged with asp.net-mvc as this has nothing to do with it. It’s itextsharp problem. Here’s a nice example illustrating how to create a PDF document containing a table.

    So for your query you could adapt it like this:

    var vv = 
         from x in db.RawMaterial 
         join y in db.ProductFormulation 
         on x.ID equals y.RawMaterialID 
         where y.ProductID == 1 
         select new { x.Description, y.Quantity };
    
    var table = new PdfPTable(2);
    table.AddCell("Description");
    table.AddCell("Quantity");
    foreach (var item in vv)
    {
        table.AddCell(item.Description);
        table.AddCell(item.Quantity);
    }
    doc.Add(table);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing a project on ASP.NET MVC 3. I am using this query
I am designing a project in asp.net 4.0, i am using MVC 3. I
I am designing a simple registration form in ASP.net MVC 1.0 I want to
I am designing a web application using the ASP.net MVC framework. I would like
I'm working on an ASP.NET MVC app, designing the domain models, using (testing) the
I'm in the process of designing my ASP.NET MVC application and I ran across
I am designing a creation wizard in ASP.NET MVC 1 and instead of posting
I'm designing a web service in ASP.NET and VS2008, and am using typed datasets
I'm in the process of developing an ASP.NET MVC project, and after several weeks
To learn ASP.net I started building a todo web app(web forms not MVC), this

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.