in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

asp.net pdf from gridview

Last post 06-12-2008 6:52 AM by lenchase. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-28-2008 8:15 AM

    asp.net pdf from gridview

    Hi:

    I just noticed that your pdf control can be used for asp.net, I am using framework 3.5 .

    Do you have a small example of creating a pdf on the web.

    I would like to use the render output of a gridview or datagrid saved as a string, and then open it for printing.

    Anything similiar would be a great help.

     

    Thanks

    Len

  • 04-28-2008 12:38 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 498

    Re: asp.net pdf from gridview

    Yes, C1PdfDocument as well as C1PrintDocument can be used in ASP.NET to generate PDFs.  But I believe rendering text from Html is still on the todo list with C1PrintDocument and not possible with C1PdfDocument.

    With C1PrintDocument you can easily render tables of data and export this to PDF.  but you'd have to loop through each cell and apply your styles manually.  I have a sample that shows this using C1WebGrid.

    ftp://ftp.componentone.com/SUPPORTFTP/public/control_samples/WebGridPDF.zip

    hope it helps,
    Greg

    Filed under: ,
  • 04-29-2008 1:19 PM In reply to

    Re: asp.net pdf from gridview

    Hi Len,
     
    Here is a small example on how to use PDF.NET in ASP.NET environment. Sample attached.
     
    Regards,
    Gary.
     
    <lenchase> wrote in message news:204329@10.0.1.98...

    Hi:

    I just noticed that your pdf control can be used for asp.net, I am using framework 3.5 .

    Do you have a small example of creating a pdf on the web.

    I would like to use the render output of a gridview or datagrid saved as a string, and then open it for printing.

    Anything similiar would be a great help.

     

    Thanks

    Len



    http://helpcentral.componentone.com/cs/forums/p/75089/204329.aspx#204329

  • 04-30-2008 7:36 AM In reply to

    Re: asp.net pdf from gridview

    Thank you !

    I will check it out.

    Len

  • 04-30-2008 8:10 AM In reply to

    Re: asp.net pdf from gridview

    Greg:

    That's about what I needed and in vb too!

    Would you happen to have a sample of using the printpreview to give the user a choice between Pdf,excel,and word(rtf) kind of like the report export functions?

    Thanks

    Len

  • 05-01-2008 1:25 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 498

    Re: asp.net pdf from gridview

    You mean C1PrintDocument?  You can also export to XLS or RTF using the same technique as that sample. All you have to change is the file extension because C1PrintDocument supports these other formats as well.  But you'll notice the page headers work differently in each file format.  So you may have to play around with that depending on what you want.  I don't have samples for that.

    Regards,

    Greg

  • 05-01-2008 3:06 PM In reply to

    Re: asp.net pdf from gridview

    Greg:

    Thanks for your help.

    I wll look at that.

    Len

  • 06-12-2008 5:22 AM In reply to

    Re: asp.net pdf from gridview

    have a look to itextsharp.dll, it's a free open source and very helpfull.

    Filed under:
  • 06-12-2008 6:52 AM In reply to

    Re: asp.net pdf from gridview

    Thank you !

    I'll take a look.

    Len

Page 1 of 1 (9 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.