im in a project which we still use - fop-0.20.5 :D
we also had the same sort of problem back in 2012!  once we updated the
java version (i exactly cant remember to which version)

as a solution we modified the src/org/apache/fop/image/FopImageFactory.java
( in the old package structure)  to convert the image urs to absolute URIs
(e.g. file:///<path>/images/). when it throws the MalformedURLException
something like below. and it saved us from changed all the layouts.

try {
                absoluteURL = new URL(href);
            } catch (MalformedURLException mue) {
                // if the href contains onl a path then file is assumed
                absoluteURL = new URL("file:///" + href);
            }


Hope this helps someone.

Regards
Asitha Weerasinghe

On Mon, Jan 18, 2016 at 9:55 PM, Torsten Stolpmann <[email protected]>
wrote:

> Yes, especially if you trying to support building your documents under
> both Windows and Linux like we are doing ...
>
> Please let me know if I can help with additional information.
>
> Torsten
>
>
> On 18.01.2016 17:18, [email protected] wrote:
>
>> This seems to be quite a limiting change for FOP 2.1 !
>> Thanks for the info!
>> Dean
>> In a message dated 1/18/2016 8:16:34 A.M. Pacific Standard Time,
>> [email protected] writes:
>>
>>     Dean,
>>
>>     yes, I did this in our docbook xsl configuration layer via changing
>>     admin.graphics.path. You may also want to set img.src.path.
>>
>>     Hope this helps,
>>
>>     Torsten
>>
>>
>>     On 18.01.2016 17:04, [email protected] wrote:
>>      > Torsten
>>      > Did you do this via XSL? Or could you describe how you did this?
>>      > Thanks
>>      > Dean
>>      > In a message dated 1/18/2016 6:12:37 A.M. Pacific Standard Time,
>>      > [email protected] writes:
>>      >
>>      >    Hi Dean,
>>      >
>>      >     I made the same experience recently, attempting a similar
>>     port from Fop
>>      >    1.1 to Fop 2.1 of our DocBook documents.
>>      >
>>      >    Apparently, Fop 2.1 seems to be more strict about the format
>>     of the url
>>      >     argument. I managed to resolve this by converting image
>>     references to
>>      >     absolute file URIs (e.g. file:///<path>/images/). I was not
>>     able to use
>>      >    a relative path and folded.
>>      >
>>      > Luckily, in my case mostly admonition graphics were affected,
>> which I
>>      >     could resolve by specifying an absolute admon.graphics.path.
>>      >
>>      >     Hope this helps,
>>      >
>>      >     Torsten
>>      >
>>      >    On 17.01.2016 02:29, [email protected] wrote:
>>      >     > Hello!
>>      >      > Thanks for everyone's hard work on the FOP 2.1 release!
>>      >      > I have a stable Docbook system with FOP 1.1 and when I
>>     upgraded
>>      >    to 2.1 I
>>      >      > noticed an issue: It appears that FOP cannot find the
>>     images in
>>      >     the new
>>      >      > system.
>>      >      > [ERROR] FOUserAgent - Image not found. URI:
>>     images/redneck9.bmp. (See
>>      >      > position 15:562)
>>      >   > Which points to this line:
>>      >      > <fo:external-graphic src="url(images/redneck9.bmp)"
>>     width="7cm"
>>      >      > height="auto" content-width="scale-to-fit"
>>      > content-height="scale-to-fit"
>>      >      > content-type="content-type:image/BMP" text-align="center"/>
>>      >     > This is exactly the same file that FOP 1.1 processes just
>>     fine and I
>>      >      > looked to see if there were any changes in the way I needed
>> to
>>      >     run FOP
>>      >      > but I could not see anything related to that.
>>      >      > Was there a change for FOP 2.1 that would cause this?
>>      >      > Thanks
>>      >   > Dean Nelson
>>      >
>>      >
>>      >
>> ---------------------------------------------------------------------
>>      >    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]
>>
>>
>
> --
> Torsten Stolpmann
> Geschäftsführender Gesellschafter
>
> verit Informationssysteme GmbH
> Europaallee 10
> 67657 Kaiserslautern
>
> E-Mail: [email protected]
> Telefon: +49 631 520 840 00
> Fax: +49 631 520 840 01
> Web: http://www.verit.de/
>
> Registergericht: Amtsgericht Kaiserslautern
> Registernummer: HRB 3751
> Geschäftsleitung: Claudia Könnecke, Torsten Stolpmann
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to