Hi everyone,

for <fo:external-graphic src="logo.jp" /> I am unable to locate the image on
my project folder(under images folder). What is the right way of doing this?
Where should be the image file for the xslt to be able to find it. Trust me
I tried almost everything on the internet? 

I tried putting the image in the same folder of xsl and also in the folder
of the java file which does the fo processing and still no luck.

I tried setting the base url from java class like this,
StreamSource xslSource = getStreamSource(XSL_SOURCE);
                        StreamSource xmlSource = getStreamSource(XML_SOURCE);
                        TransformerFactory factory = 
TransformerFactory.newInstance();
                        Templates xslTemplate = factory.newTemplates(xslSource);
                        ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
                        FopFactory fopFactory = FopFactory.newInstance();
                        System.out.println(fopFactory.getURIResolver());
                        fopFactory.setBaseURL(".");
                        System.out.println("******"+fopFactory.getBaseURL());
                        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
baos);
                        Transformer transformer = xslTemplate.newTransformer();
                        Result res = new SAXResult(fop.getDefaultHandler());

so when i print the base url it prints the domain directory which is not
what i want. This is what it prints

******file:/C:/Oracle/Middleware/user_projects/domains/myDomain/./

I want the application ear path so that i can give the relative path of
images folder.

Someone pls help me out with this. Struggling for over a month now.
-- 
View this message in context: 
http://old.nabble.com/Unable-to-display-images-on-pdf...PLs-help-tp33726090p33726090.html
Sent from the FOP - Dev mailing list archive at Nabble.com.

Reply via email to