Outputting to a pdf from xml/html

Last post 07-06-2007 5:46 PM by fchivu. 4 replies.

Sort Posts:

  • Outputting to a pdf from xml/html

    04-10-2006, 9:39 PM
    • Member
      12 point Member
    • troy_a
    • Member since 04-11-2006, 1:31 AM
    • Posts 3

    Hello, I have recently started a project where I have to produce a pdf document in asp.net.

    I can find librarys to produce pdf documents but the problem is that I need do display html that is stored in xml files.

    For example i have to be able to produce a pdf with tables and images from a html file.

    I would prefer to use an open-source product but it is not essential.

    Does anyone have any suggestions to which software I could use?

    Thanx

  • Re: Outputting to a pdf from xml/html

    04-10-2006, 10:14 PM
    • All-Star
      30,698 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    You might want to take a look at iTextSharp.

    HTH,
    Ryan

  • Re: Outputting to a pdf from xml/html

    06-13-2006, 1:39 AM
    • Member
      12 point Member
    • troy_a
    • Member since 04-11-2006, 1:31 AM
    • Posts 3

    Thanks for the reply,

    Still no luck with that iTextSharp program: Need to convert CSS/HTML styling with images to a PDF dynamically. Have looked at; CutePDF(gotta pay for the Pro version).

     

    Any other free program I could use.

     

    Cheers

  • Re: Outputting to a pdf from xml/html

    06-17-2006, 12:42 AM
    • Member
      10 point Member
    • aspdotnetdude
    • Member since 06-17-2006, 4:35 AM
    • Posts 2

    To convert HTML to PDF in ASP.NET you could try this:

    http://www.mikeross.tv/mikerossdotpdf.aspx

    It is not free, but it may work for what you need to do.

     

     

  • Re: Outputting to a pdf from xml/html

    07-06-2007, 5:46 PM
    • Member
      48 point Member
    • fchivu
    • Member since 02-02-2007, 12:08 PM
    • Posts 24

    Hi,

    The HTML to PDF library for .NET  from http://www.dotnet-reporting.com or the HTML to PDF converter from http://www.winnovative-software.com is what you need. It's pure .NET library, it doesn't use a printer driver. There is also a free html to pdf converter application built on top of this library. The conversion can be done with only a few lines of code:

    PdfConverter pdfConverter = new PdfConverter();
    pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
    pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
    pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
    pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;
    pdfConverter.PdfDocumentOptions.ShowFooter = false;
    pdfConverter.PdfDocumentOptions.ShowHeader = false;
    pdfConverter.LicenseFilePath = Server.MapPath(@"~/Bin");
    byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(MyURL);  

     

    Regards,

    Razva

    Filed under:
Page 1 of 1 (5 items)