Html to PDF

2006-12-11
2013-05-01
  • Nobody/Anonymous

    Hello

    I try to convert HTML to PDF with no sucess with the sample code (i din't find other sample)

    Dim Document As New Document(PageSize.A4, 80, 50, 30, 65)
            ' step 2:
            ' we create a writer that listens to the document
            ' and directs a XML-stream to a file
            PdfWriter.getInstance(Document, New FileOutputStream("Chap0703.pdf"))
            ' step 3: we create a parser and set the document handler
            Dim parser As SAXParser = SAXParserFactory.newInstance().newSAXParser()
            ' step 4: we parse the document
            parser.parse("Chap0703.xml", New SAXmyHandler(Document, New TagMap("tagmap0703.xml")))

    Not very clear for me and i have this error :

    "Provider for javax.xml.parsers.SAXParserFactory cannot be found "

    Is it possible to convert HMLT or XHTML to PDF ?

    Thanks

     
    • Nobody/Anonymous

      You have to load SAX parser like the following code.
        System.Reflection.Assembly.Load("Apache.Xml.Commons");
        System.Reflection.Assembly.Load("Apache.Crimson");
      Above code is for iText.NET 2005.

       
    • Nobody/Anonymous

      Thanks a lot!

      work fine now !

      PS : i use FreeTextBox.net with Itext.net and it is a very very powerful tools for end users. Good job!   :-)

       
    • Nobody/Anonymous

      can you guys post the full article on this --> HTMl to PDF

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks