Bug 45938 - Better feedback needed for unknown image formats
Summary: Better feedback needed for unknown image formats
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-02 09:05 UTC by Vincent Hennebert
Modified: 2012-04-01 06:32 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hennebert 2008-10-02 09:05:33 UTC
If an image in an unknown format is specified as a background-image, FOP gives a misleading error message:
  <fo:block background-image="unknown.xyz">Block</fo:block>

 org.apache.fop.fo.properties.CommonBorderPaddingBackground getInstance
SEVERE: Background image not available: unknown.xyz

When the same image is specified as an external-graphic, the error message is hardly better:
  <fo:external-graphic src="unknown.xyz"/>

org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: unknown.xyz. Reason: org.apache.xmlgraphics.image.loader.ImageException: No ImagePreloader found for unknown.xyz

I discovered the issue by stumbling upon an svg file that didn't contain any doctype declaration, hence not recognized as svg. Feedback should be improved by clearly mentioning that the image is of an unrecognized format.
Comment 1 Chris Bowditch 2008-10-03 00:55:11 UTC
In addition to what Vincent said I have also noticed that the message you do get when FOP can't add a background image is sent to the Logger and not to the Event Listener.
Comment 3 Glenn Adams 2012-04-01 06:32:22 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed