Re: FOP - Exception <java.lang.IllegalArgumentException: URI is not hierarchical>java.lang.IllegalArgumentException: URI is not hierarchical

Jeroen Baten <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi,

Changing the file to the following fixed the issue.
Thanks all for the support!


<fop version="1.0">
   <renderers>
     <renderer mime="application/pdf">
       <fonts>

         <font  kerning="yes" 
embed-url="./fonts/OpenDyslexic-BoldItalic.ttf">
           <font-triplet name="OpenDyslexic" style="italic" weight="bold"/>

         </font>

         <font  kerning="yes" embed-url="./fonts/OpenDyslexic-Bold.ttf">
           <font-triplet name="OpenDyslexic" style="normal" weight="bold"/>
         </font>

         <font  kerning="yes" embed-url="./fonts/OpenDyslexic-Italic.ttf">
           <font-triplet name="OpenDyslexic" style="italic" 
weight="normal"/>
         </font>

         <font  kerning="yes" embed-url="./fonts/OpenDyslexic-Regular.ttf">
           <font-triplet name="OpenDyslexic" style="normal" 
weight="normal"/>
         </font>
       </fonts>
     </renderer>
   </renderers>
</fop>

Op 20-06-17 om 13:25 schreef Simon Steiner:
> Hi,
> 
> What about using, metrics-url isn't needed normally.
> <font  kerning="yes" embed-url="fonts/OpenDyslexic-BoldItalic.ttf">
> 
> Thanks
> 
> -----Original Message-----
> From: Jeroen Baten [mailto:[email protected]]
> Sent: 20 June 2017 11:36
> To: [email protected]
> Subject: Re: FOP - Exception <java.lang.IllegalArgumentException: URI is not
> hierarchical>java.lang.IllegalArgumentException: URI is not hierarchical
> 
> Hello,
> 
> Of course I can share my config file. It is relatively small.
> I use relatieve paths because everything is in a git repo and I like to use
> relative paths in my project.
> 
> Must I use absolute paths in this file?
> 
> Warm regards,
> Jeroen Baten
> 
> 
> 
> <fop version="1.0">
>     <renderers>
>       <renderer mime="application/pdf">
>         <fonts>
> 
>           <font  metrics-url="file:fonts/OpenDyslexic-BoldItalic.ttf.xml"
>     kerning="yes" embed-url="file:fonts/OpenDyslexic-BoldItalic.ttf">
>             <font-triplet name="OpenDyslexic" style="italic" weight="bold"/>
>           </font>
> 
>           <font  metrics-url="file:fonts/OpenDyslexic-Bold.ttf.xml"
>     kerning="yes" embed-url="file:fonts/OpenDyslexic-Bold.ttf">
>             <font-triplet name="OpenDyslexic" style="normal" weight="bold"/>
>           </font>
> 
>           <font  metrics-url="file:fonts/OpenDyslexic-Italic.ttf.xml"
>     kerning="yes" embed-url="file:fonts/OpenDyslexic-Italic.ttf">
>             <font-triplet name="OpenDyslexic" style="italic"
> weight="normal"/>
>           </font>
> 
>           <font  metrics-url="file:fonts/OpenDyslexic-Regular.ttf.xml"
>     kerning="yes" embed-url="file:fonts/OpenDyslexic-Regular.ttf">
>             <font-triplet name="OpenDyslexic" style="normal"
> weight="normal"/>
>           </font>
>         </fonts>
>       </renderer>
>     </renderers>
> </fop>
> 
> Op 19-06-17 om 23:39 schreef Alexios Giotis:
>> Hi Jeroen,
>>
>>   From the stacktrace, the problem is determining the path to a font
>> configured in dyslexicfontconfig.xml. It seems that the path to the
>> font (font embed URI) is not well defined or more precisely that the
>> created URI is opaque. Fop is now stricter related to how relative
>> paths are resolved. If the change is not obvious, try changing the log
>> level to trace. To get more help, please share the fop config file.
>>
>>
>> A URI is opaque if, and only if, it is absolute and its
>> * scheme-specific part does not begin with a slash character ('/').
>> * An opaque URI has a scheme, a scheme-specific part, and possibly
>> * a fragment; all other components are undefined.
>>
>> BR,
>> Alexios
>>
>>
>>
>>> On 19 Jun 2017, at 11:31, Jeroen Baten <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> Hello,
>>>
>>> 4 years ago I wrote a book. Now it is time to update it.
>>> So I changed the asciidoc sources, did not change the build setup,
>>> but now fop borks. Any hint would be highly appreciated.
>>> My command and error message is:
>>>
>>>
>>> $ fop  -d -v -c ./dyslexicfontconfig.xml  ./lpi_essentials.fo
>>> ./lpi_essentials-di.fo FOP Version 2.1 [ERROR] FOP - Exception
>>> <java.lang.IllegalArgumentException: URI is not
>>> hierarchical>java.lang.IllegalArgumentException: URI is not
>>> hierarchical at java.io.File.<init>(File.java:392)
>>> at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
>>> at
>>> org.apache.fop.fonts.DefaultFontConfigurator.getFontInfo(DefaultFontC
>>> onfigurator.java:173)
>>> at
>>> org.apache.fop.fonts.DefaultFontConfigurator.addFonts(DefaultFontConf
>>> igurator.java:136)
>>> at
>>> org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontCon
>>> figurator.java:89)
>>> at
>>> org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollecti
>>> on(PrintRendererConfigurator.java:147)
>>> at
>>> org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRe
>>> ndererConfigurator.java:127) at
>>> org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
>>> at
>>> org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRendere
>>> r.java:187) at
>>> org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
>>> at
>>> org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:1
>>> 35) at
>>> org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
>>> at
>>> org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFa
>>> ctory.java:350) at
>>> org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
>>> at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
>>> at org.apache.fop.apps.Fop.<init>(Fop.java:78)
>>> at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:182)
>>> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:107)
>>> at org.apache.fop.cli.Main.startFOP(Main.java:186)
>>> at org.apache.fop.cli.Main.main(Main.java:217)
>>>
>>>
>>>
>>> -- 
>>> Jeroen Baten              | EMAIL : [email protected]
> <mailto:[email protected]>
>>> ____  _  __              | web   : www.i2rs.nl <http://www.i2rs.nl>
>>>   |  )|_)(_               | tel   :  +31 (0)345 - 75 26 28
>>> _|_/_| \__)              | Molenwindsingel 46, 4105 HK, Culemborg, the
>>> Netherlands
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> <mailto:[email protected]>
>>> For additional commands, e-mail:
>>> [email protected]
>>> <mailto:[email protected]>
>>>
>>
> 

-- 
Jeroen Baten              | EMAIL :  [email protected]
  ____  _  __              | web   :  www.i2rs.nl
   |  )|_)(_               | tel   :  +31 (0)345 - 75 26 28
  _|_/_| \__)              | Molenwindsingel 46, 4105 HK, Culemborg, the 
Netherlands
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.