Results 1 to 9 of 9

Thread: [RESOLVED] Export aspx page to pdf

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Resolved [RESOLVED] Export aspx page to pdf

    Hi friends,

    My client have one requirement. I have an default.aspx page. In this page

    <html>
    <head>
    <title>save pdf</title>
    <body>
    <div>
    <table id = "tblpara">
    <p> -- I have some paragraph --- </p>
    </table>
    </div>
    <input type="button" id="btndownload" value ="Download" runat="server"/>
    </body>

    I have download button. Once i click download button its downloading and save as pdf file. Is it possible???

    Its very urgent. Please suggest me. Hope yours reply.

    Thanks
    Failing to plan is Planning to fail

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Export aspx page to pdf

    Hey,

    One way of doing this would be to use iTextSharp:

    http://itextsharp.sourceforge.net/

    Hope that helps!!

    Gary

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: Export aspx page to pdf

    Hi gep,

    Thanks for your reply. Instead of ITextSharp, any other options are available??
    Because for ITextSharp, we need to download and add dll reference.Thats y i am asking.
    Failing to plan is Planning to fail

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Export aspx page to pdf

    Hey,

    In order to support on the fly PDF generation, then it is likely that you are going to need a 3rd party library.

    I am not aware of away of doing this otherwise.

    Why can you not add this reference?

    Gary

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: Export aspx page to pdf

    Hi gep,

    I download and add dll in my APP_Code. But the namespace using iTextSharp namespace is not available. What is the problem??
    Failing to plan is Planning to fail

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Re: Export aspx page to pdf

    Hi gep,

    I am sorry. I got it ya. Thanks for your help. Great :-)
    Failing to plan is Planning to fail

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Export aspx page to pdf

    Hey,

    Glad to hear that you got it working?

    Does this answer your question? If so, remember to mark your thread resolved.

    Gary

  8. #8
    New Member
    Join Date
    Oct 2009
    Posts
    2

    Lightbulb Re: [RESOLVED] Export aspx page to pdf

    Hi,

    Use PDF Duo .NET component. It converts HTML to PDF. For example, you can convert a string with HTML source into a PDF

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Export aspx page to pdf

    Quote Originally Posted by Kostya View Post
    Hi,

    Use PDF Duo .NET component. It converts HTML to PDF. For example, you can convert a string with HTML source into a PDF
    Hey,

    I haven't played with this, but it is likely to include some form of binary that you have to include in your project, and that is what the OP seemed to be trying to avoid.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width