BIRT: pdf emitter, load/use fonts from relative path or from jar files

前端 未结 2 574
心在旅途
心在旅途 2021-01-13 05:51

I use BIRT since early days and still have riddles regarding PDF emitter.

Short story: Can I configure fontsConfig.xml to load fonts from relative

2条回答
  •  梦毁少年i
    2021-01-13 06:00

    There is a way to have fonts on a relative path to be used in Birt.

    What you need to do is copy the fonts to a location in your Web Application. Mine was in : C:\\src\main\webapp\Reports

    Now in the application, use the following command to register the fonts from the above mentioned location.

    FontFactory.registerDirectory( scContext.getRealPath("/Reports") );
    

    This will register the font.

    Tested on Birt 4.3 through Spring MVC

提交回复
热议问题