Neevia Technology Sites:   www.neevia.com  |  docuPub.com  |  www.neeviaPDF.com
:: Home :: Products :: Technical Support :: About Us :: Contact Us
Technical support > Neevia docCreator code samples
Example 7: Convert an URL / HTML file into PDF from VB.NET  Print Example 


   Dim IE As Object : IE = CreateObject("InternetExplorer.Application")
   IE.Visible = True

   Dim DC As Object : DC = CreateObject("Neevia.docCreator")

   IE.navigate2("http:\\www.neevia.com")
   DC.doSleep(100)

   While (IE.ReadyState <> 4) Or (IE.Busy)
     DC.doSleep(100)
   End While

   DC.setParameter("documentOutputFormat", "PDF")
   DC.setParameter("documentOutputName", "testURL_VBNET")
   DC.setParameter("documentOutputFolder", "d:\")

   Dim RVal As Integer = DC.startPrinting
   If (RVal <> 0) Then MsgBox("Error while creating the virtual printer!!!")

   Dim defPrinter As String = DC.getDefaultPrinter
   DC.setDefaultPrinter(DC.newPrinterName)

   IE.ExecWB(6, 2)

   RVal = DC.create
   If (RVal <> 0) Then MsgBox("Error while creating document!!!")

   IE.Quit()

   DC.setDefaultPrinter(defPrinter)
   RVal = DC.stopPrinting
   If (RVal <> 0) Then MsgBox("Error while deleting the virtual printer!!!")

   IE = Nothing
   DC = Nothing

   MsgBox("Done Converting !!!")



Copyright © 1999-2016 Neevia Technology. All Rights Reserved. Home | Products | Technical Support | About Us | Contact Us