Hi Saptarshi,

Hmmm... yes your application need uses the CommanLineOptions class that's
why u mentioned the -c switch.

Well, in my case the process of PDF generation is simple -> XML + XSL = PDF,
in which I have to introduce MICR fonts and I guess the
org.apache.fop.apps.Options will work for me.

But good to know about the CommandLineOptions class, never know when I may
need it.

thanks,
Anil.

-----Original Message-----
From: Saptarshi Sen [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 12:12 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: MICR font in FOP as an embedded application..


Hi Anil,
        We are using FOP to convert SVG images -> FO -> PDF. After forming
the FO file, we issue a command to FOP to convert it to a PDF. The call to
FOP goes somewhat like this:

        String[] args = new String[]{"-c", userConfigFile, "-fo", inputFile,
"-pdf", outputFile};

        try {
                CommandLineOptions options = new CommandLineOptions(args);
                Starter starter = options.getStarter();
                starter.run();

        } catch (FOPException fopEx) {
        } catch (FileNotFoundException fnfEx) {
        }

        Here, userConfigFile, inputFile and outputFile are the paths of the
respective files. If you check the Fop.java source code, it does a similar
thing in it's main() method.

Regards,
Saptarshi.

-----Original Message-----
From: Anil R. Pinto [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 10:29 AM
To: [EMAIL PROTECTED]
Subject: RE: MICR font in FOP as an embedded application..


Thanks guys,

As the userconfig xml within the jar s not being used, I guess I'll stick to
the approach mentioned by Saptarshi, which hapens to also be the one
suggested on the Apache FOP website, except one thing, in the embedded mode
we need to use the org.apache.fop.apps.Options class that represents the
'-c' switch used for the command line option.

If anyone has any other approach I'll be more than happy to hear from them.

Thanks everyone.
Anil

-----Original Message-----
From: Chris Bowditch [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 7:35 PM
To: [EMAIL PROTECTED]
Subject: Re: MICR font in FOP as an embedded application..


Anil R. Pinto wrote:

<snip/>

> But, the main requirement is to use this behavior with FOp running as an
> embeded application (using fop.jar).
>
> Can someone please guide me to a thread that covers this ?

How to use a config file in an embedded environment is described on the
website:

http://xml.apache.org/fop/embedding.html#config-external

>
> I am lost as to where should the custom font-metrics xml and
userconfig.xml
> file reside when using the standard fop.jar (as the userconfig.xml already
> exists in the jar)

Yes, there is indeed a userconfig.xml in FOP.jar, but its not used!

<snip/>

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to