Hi Sabine,
On 16.11.2006 11:40, sabine wrote:
> Hi ,
>
> [...]
>> Not sure, but specifying a drive letter in the url makes it absolute,
>> doesn't it? If you set the <font-base> element appropriately, specifying
>> the URL just like that: "path/to/my/font.pfb" should work.
>>
>>
> Specifying a <font-base> element did not work either. What does it mean
> "path/to/my/font.pfb". Where does the path starts?
>
> Now I'm setting my font-base through fopFactory.setFontBaseUrl(String
> url) like:
>
> main class:
> ...
> Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
> fopFactory.setUserConfig("config/fop.xconf");
>
> File file = new File("fonts/AWSBS___.PFM");
> System.out.println(file.exists()); //result is true...
> fopFactory.setFontBaseURL(file.getAbsolutePath());
>
> System.out.println(foUserAgent.getFontBaseURL());
>
> ...
>
> But still. It's is not working
I've once had the same problems, but I solved them in the end:
I don't use the <font-base>-tag in my config file at all, but instead I
use setFontBaseURL() at runtime - just like you mentioned above. The
only difference is that I manually added "file:" to the path, i.e. in
your case I would call setFontBaseURL("file:" + file.getAbsolutePath()).
That finally did the trick, and I hope it works for you, too. :-)
HTH,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]