OK, that might work. -----Original Message----- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: February 19, 2008 12:21 AM To: [email protected] Subject: Re: Relative font path in config file
Either you have to make sure FOP can find the fonts relative to your input file (the XML), or you can try using "." as the value for the font-base setting. That doesn't make it relative to the FOP installation (because we don't have a reliable way of determining that) but relative to the current directory of the current process. On 18.02.2008 19:08:07 Glenn Brand wrote: > Thanks, > > We are calling fop from the command line. Is there any way to make it > work that way? > > c:\cachesys\csp\nea\Plugins\fop-0.94\fop.bat -log > c:\cachesys\csp\nea\ExamLabel.log -c > c:\cachesys\csp\nea\Plugins\fop-0.94\conf\fop.xml -xml > c:\cachesys\csp\nea\ExamLabel.xml -xsl > c:\cachesys\csp\nea\ExamLabel.xslt -pdf > c:\cachesys\csp\nea\ExamLabel.pdf > > -----Original Message----- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] > Sent: February 18, 2008 12:21 AM > To: [email protected] > Subject: Re: Relative font path in config file > > Patience, please. Posting your question once is usually sufficient. It > was just the weekend in between. ;-) > > You can simply use relative filenames, i.e.: > <font metrics-url="arial.xml" kerning="yes" > embed-url="arial.ttf"> > <font-triplet name="Arial" weight="normal" style="normal"/> > </font> > > For this to work, you need to set the "font base URI/URL". This can be > done in the configuration file using the "font-base" element. See here: > http://xmlgraphics.apache.org/fop/stable/configuration.html > > But that leaves you with the same problem, so you should probably rather > use the FopFactory.setFontBaseURL(String) method in your code instead of > using the "font-base" setting in the config file. > http://xmlgraphics.apache.org/fop/0.94/embedding.html#fop-factory > > On 15.02.2008 20:23:43 Glenn Brand wrote: > > How do I make the path in the config file relative to where fop is > > installed. I want to put our fonts in a directory with fop. > > > > We are doing this right now but the target directory changes at times > > and we want the installer to be able to install without writing the > path > > into the config file. > > > > > > > > <font metrics-url="file:///c:/ODProfessional/Fonts/arial.xml" > > kerning="yes" embed-url="file:///c:/ODProfessional/Fonts/arial.ttf"> > > <font-triplet name="Arial" weight="normal" style="normal"/> > > </font> > > > > <font > metrics-url="file:///c:/ODProfessional/Fonts/arialbd.xml" > > kerning="yes" embed-url="file:///c:/ODProfessional/Fonts/arialbd.ttf"> > > <font-triplet name="Arial" weight="bold" style="normal"/> > > </font> > > > > <font metrics-url="file:///c:/ODProfessional/Fonts/ariali.xml" > > kerning="yes" embed-url="file:///c:/ODProfessional/Fonts/ariali.ttf"> > > <font-triplet name="Arial" weight="normal" style="italic"/> > > </font> > > > > > > > > > > > Jeremias Maerki > Jeremias Maerki --------------------------------------------------------------------- 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]
