Calling Apache FOP from VB.NET

Balaji D Loganathan

26 sec read

The VB.NET code to call apache FOP from .net, a annexure to my previous blog

————-
Try
  AppDomain.CurrentDomain.Load(“xercesImpl-2.2.1”)
  AppDomain.CurrentDomain.Load(“batik”)
  java.lang.System.setProperty(“javax.xml.parsers.SAXParserFactory”, “org.apache.xerces.jaxp.SAXParserFactoryImpl”)
  Dim isrc As org.xml.sax.InputSource = New org.xml.sax.InputSource(filename & “.fo”)
  Dim fs As java.io.FileOutputStream = New java.io.FileOutputStream(filename & “.pdf”)
  Dim driver As Driver = New Driver(isrc, fs)
  ‘driver.setLogger(cl)
  driver.setRenderer(driver.RENDER_PDF)
  driver.run()
  fs.close()
  ‘process .pdf file now

Catch ex As Exception
  ‘process ex
  
End Try
————–

Related posts:

One Reply to “Calling Apache FOP from VB.NET”

Leave a Reply

Your email address will not be published. Required fields are marked *