xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Roberts" <Karl.Robe...@macquarie.com>
Subject RE: relative addressing of font metrics file
Date Tue, 07 Mar 2006 00:19:11 GMT
>From the comment in The default FOURIResolver

This resolver will allow URLs without a scheme, i.e. it assumes 'file:'
as
the default scheme. It also allows relative URLs with scheme, 
e.g. file:../../abc.jpg which is not strictly RFC compliant as long as
the 
scheme is the same as the scheme of the base URL. If the base URL is
null 
a 'file:' URL referencing the current directory is used as the base URL.

You can pass a different URIResolver into the FOUserAgent before you
instanciate the Fop

Jeremias Maerki posted a ServletContextURIResolver to trunk at
http://svn.apache.org/viewcvs?rev=379810&view=rev that can take a
"servlet-context:" protocol so graphics in the xsl:fo file can be
resolved relative to the ServletContext.

I posted a potential change to FOP in an earlier message (subject= RE:
<SOLVED - sort of> Re how to embed a font programatically) that shows
how the URIResolver passed into the UserAgent can be used to locate the
Font metrics as well.
I've not pushed this up to trunk as I'm not an official FOP developer
yet

Karl Roberts

-----Original Message-----
From: Tracey Zellmann [mailto:tracey.zellmann@comcast.net] 
Sent: Tuesday, 7 March 2006 5:01 AM
To: fop-users@xmlgraphics.apache.org
Subject: relative addressing of font metrics file

Dirk Bromberg was able to help me earlier today with a typo in my font
metrics url address. I have evrything workkng now. However, I am not
sure how to get relative addressing to work. I can succeed with absolute
addressing since I control where the files are placed. I would feel
better, though, if I could get the relative address to succeed.

Right now, I have both the fop.xconf file and the ttfcm.xml file in the
same folder conf, under the main application folder SoundEvaluation.
>From within my program, I can get the configuration file with cfg =
cfgBuilder.buildFromFile("conf/fop.xconf");

The sample configuration file includes comments that say that relative
config url's will be resolved relative to the location of this file. My
first assumption was that the font metrcis url would therefore be:
<font metrics-url="file:///ttfcm.xml"/> but that did not work.

I have tried other paths, building up to the absolute path which finally
does work <font
metrics-url="file:///C:/eclipse/workspace/SoundEvaluation/conf/ttfcm.xml
">

I must be missing something about the sytax or format of the relative
path. 
Can someone guide me?

Thanks. 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie
Bank or third parties. If you are not the intended recipient of this email you should not
read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and
should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message