You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2009/02/27 11:37:29 UTC

DO NOT REPLY [Bug 46778] New: image not found

https://issues.apache.org/bugzilla/show_bug.cgi?id=46778

           Summary: image not found
           Product: Fop
           Version: 0.95
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: tdrewes@gmx.net


Abstract: 
Seems to me that fop 0.95 (embedded) image handling is different to fop 0.94
(embedded) image handling.

Details:

We are using embedded fop 0.95 from the binary fop.jar in our application to
generate pdf from xml via xslt.

The xslt code looks like this:

<fo:external-graphic border-right-style="none">
   <xsl:attribute name="src">
     <xsl:text>url("file:///home/abc/atxRptLogo3.jpg")</xsl:text>
   </xsl:attribute>
</fo:external-graphic>

In my code I do something like this:
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
foUserAgent.setBaseURL(properties.getBaseDir("file:///");
// just to make sure

I then get the fop error message:
2009-02-25 11:28:59,037 [thread-2] ERROR org.apache.fop.fo.FONode  - Image not
found: file:///home/abc/atxRptLogo3.jpg

atxRptLogo3.jpg is in /home/abc and accessible from the permissions.


Since we had no problems with a binary fop 0.94 running not embedded but
standalone I compiled the fop 0.94 with jdk 1.5 and created a fop.jar and
redeployed our application.

*** With fop 0.94 embedded the image is found and displayed!


Note: We played around with various notations of baseURL and the image url, for
example:
foUserAgent.setBaseURL(properties.getBaseDir("file:///home/abc");
and
<xsl:text>url("file://atxRptLogo3.jpg")</xsl:text>
but nothing helped

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778

--- Comment #4 from Glenn Adams <ga...@apache.org> ---
batch transition resolved+wontfix to closed+wontfix

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778


Thorsten Drewes <td...@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tdrewes@gmx.net




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominik.stadler@gmx.at

--- Comment #2 from Dominik Stadler <do...@gmx.at> 2010-02-08 04:56:40 UTC ---
I saw a similar issue with 0.95, I could not get FOP to find the images when I
used relative pathes and the baseDir. Prepending "file:///" in the baseDir also
did not have any effect.

In the end I prepended the full path in the XSL-FO file to load the images
correctly.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778





--- Comment #1 from Jeremias Maerki <je...@apache.org>  2009-02-27 07:14:28 PST ---
Yes, the image handling has been rewritten between 0.94 and 0.95. It should
actually be much better than before and I think we've managed to meet that
goal, but it could still be that there's a Gremlin hidden somewhere. In this
case however, I don't know what to do. I've just tried to reproduce your case
in my Ubuntu VM but that absolute file URL (including the url() wrapper) worked
fine for me. Well, I did it from the command-line as I don't have a full
development environment in there (I develop on WinXP). Could you also try if
there's a different behaviour when run from the command-line? That could give
us some hints. Anyway, I think the easiest way to identify the problem is if
you can debug on your side.

The best entry point is probably:
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.newSource()
or
org.apache.fop.fo.flow.ExternalGraphic.bind()

Good luck!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #5 from Glenn Adams <ga...@apache.org> ---
batch transition resolved+wontfix to closed+wontfix; if you believe this
remains a bug and can demonstrate it with appropriate input FO file and output
PDF file (as applicable), then you may reopen

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 46778] image not found

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46778

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #3 from Glenn Adams <gl...@skynav.com> 2012-04-04 22:40:09 UTC ---
closing due lack of (1) input FO file, (2) referenced image file(s), (3) output
PDF file, (4) console output; if desired, please rerun on FOP trunk and provide
these files as attachments to this bug

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.