}
}
/*TranscoderFactory factory =
ConcreteTranscoderFactory.getTranscoderFactoryImplementation();
*/
Transcoder t = null;
if (mimeType.equals("image/jpg") ||
mimeType.equals("image/jpeg") ||
mimeType.equals("image/jpe")) {
t = new JPEGTranscoder();
} else if (mimeType.equals("image/png")) {
t = new PNGTranscoder();
} else if (mimeType.equals("application/pdf")) {
try {
Class cla = Class.forName("org.apache.fop.svg.PDFTranscoder");
Object obj = cla.newInstance();
t = (Transcoder)obj;
} catch(Exception e) {
t = null;
error("PDF transcoder could not be loaded");
}
} else if (mimeType.equals("image/tiff")) {
t = new TIFFTranscoder();
}
if (t == null) {
error("No transcoder found for mime type : "+mimeType);
System.exit(1);
}
if(!Float.isNaN(width)){
t.addTranscodingHint(ImageTranscoder.KEY_WIDTH,
new Float(width));
}
if(!Float.isNaN(height)){
t.addTranscodingHint(ImageTranscoder.KEY_HEIGHT,
new Float(height));
}
t.addTranscodingHint(ImageTranscoder.KEY_BACKGROUND_COLOR,
background);
for (Iterator iter = svgFiles.iterator(); iter.hasNext();) {
String s = (String) iter.next();
URL url = getSVGURL(s);