Loading ...
Sorry, an error occurred while loading the content.

Upgrading to 0.93 - Deprecated methods

Expand Messages
  • Fournier,Danny [NCR]
    I am trying to run 0.93 using 0.20.5 s API. I m just wondering if someone would know off the top of their heads the equivalent calls? Reading the upgrade page
    Message 1 of 2 , Jan 25, 2007
    • 0 Attachment
      I am trying to run 0.93 using 0.20.5's API. I'm just wondering if
      someone would know off the top of their heads the equivalent calls?
      Reading the upgrade page indicates that a new API was release with 0.93
      and based on the error that I'm getting, I should be calling different
      methods.

      I was using the setInputSource(), setOutputStream() and run() methods.

      Here is the list of relevant calls to FOP (in Coldfusion and some lines
      were taken out for simplicity):

      <cfset THIS.driver = CreateObject("java", "org.apache.fop.apps.Driver")>

      <cfset var reader = CreateObject("java", "java.io.StringReader")>
      <cfset var input = CreateObject("java", "org.xml.sax.InputSource")>
      <cfset reader.init(foString)>
      <cfset input.init(reader)>
      <cfset THIS.driver.setInputSource(input)>

      <cfset var output = CreateObject("java", "java.io.FileOutputStream")>
      <cfset output.init( ARGUMENTS.pdfFile )>
      <cfset THIS.driver.setOutputStream(output)>

      <cfset THIS.driver.run()>


      PS: I am not the originator of the original code that this was taken
      from
    • Chris Bowditch
      ... If you have downloaded FOP onto your machine you can take a look at example code on how to embed FOP with the new API in the following directory below the
      Message 2 of 2 , Jan 25, 2007
      • 0 Attachment
        Fournier,Danny [NCR] wrote:

        >
        >
        > I am trying to run 0.93 using 0.20.5's API. I'm just wondering if
        > someone would know off the top of their heads the equivalent calls?

        If you have downloaded FOP onto your machine you can take a look at
        example code on how to embed FOP with the new API in the following
        directory below the root of your FOP install:

        \examples\embedding\java\examples

        Chris

        <snip/>
      Your message has been successfully submitted and would be delivered to recipients shortly.