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]

-----------------------------------------------------------------------------------------------------------------------------
Disclaimer
-----------------------------------------------------------------------------------------------------------------------------

"This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission."

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

Reply via email to