Hi Pietschmann, thanks for your patience, i know it is not easy alwasy answering always the same questions. But i have not been luckily with my research, fag, search engines, etc.
Does your browser open a PDF viewer? No! Do you get error messages? Which messages? Yes, please see below. Can you download the expected content using a command line tool? Yes i can perform the operation with saving the xml-source as file and then transform over fop.bat by command line. I have log all the steps in Tomcat 4.2.9, i am using java 1.4. Here it goes: 2004-09-08 10:36:10 START of PDF 2004-09-08 10:36:10 actionId == 10 2004-09-08 10:36:10 try 2004-09-08 10:36:10 if (logPDF == null) 2004-09-08 10:36:10 sXSL: http://localhost:8080/ho/cfcreports/xsl/cfcreportpdf.xsl 2004-09-08 10:36:10 sReturnString: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet href="http://localhost:8080/ho/cfcreports/xsl/cfcreportpdf.xsl" type="text/xsl"?> <root lang="en"> <user> <name>Administrator</name> <nr>1</nr> </user> <interaction> <api> <uri>cfcreports</uri> <name></name> </api> <maskStatus></maskStatus> <maskStatusInteger>0</maskStatusInteger> <selectdocument>true</selectdocument> </interaction><head> <title>Account Posting</title> </head> <body><tabelle name="R_KONTOBUCHUNG" title="account posting" rows="180"> ... etc </row> </tabelle></body></root> 2004-09-08 10:36:10 xslSource: [EMAIL PROTECTED] 2004-09-08 10:36:10 xmlSource: [EMAIL PROTECTED] 2004-09-08 10:36:10 catch (Exception e)org.apache.fop.apps.FOPException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.net.MalformedURLException 2004-09-08 10:36:10 END of PDF 2004-09-08 10:36:10 END ofdoGetPost(HttpServletRequest request, HttpServletResponse response) the sReturnString comes from a java instance as string, the stylesheet is for testing hardcoded: String sHost = hoToolSet.getHttpProtocol( c_request ) + "://" + c_request.getHeader("host"); String sXSL = sHost + "/ho/cfcreports/xsl/cfcreportpdf.xsl"; Because of an exception the call XSLTInputHandler input = new XSLTInputHandler(xslSource, xmlSource); is not performed. The CODE: <snip> log("START of PDF"); log("actionId == 10"); // Source xslSource = new SAXSource(new InputSource(new URL(sXSL).openStream())); // Source xmlSource = new SAXSource(new InputSource(new StringReader(sReturnString))); // ByteArrayInputStream xmlin = new ByteArrayInputStream(xml.getBytes()); //ByteArrayInputStream xslin = new ByteArrayInputStream(xsl.getBytes()); try { log("try"); if (logPDF == null) { log("if (logPDF == null)"); logPDF = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); MessageHandler.setScreenLogger(logPDF); } String sHost = hoToolSet.getHttpProtocol( c_request ) + "://" + c_request.getHeader("host"); String sXSL = sHost + "/ho/cfcreports/xsl/cfcreportpdf.xsl"; log("sXSL: " + sXSL); log("sReturnString: " + sReturnString); InputSource xslSource = new InputSource(new URL(sXSL).openStream()); InputSource xmlSource = new InputSource (new StringReader(sReturnString)); log("xslSource: " + xslSource); log("xmlSource: " + xmlSource); XSLTInputHandler input = new XSLTInputHandler(xslSource, xmlSource); //StreamSource xmlSource = new StreamSource(new StringReader(sReturnString)); log("actionId == 10 go to renderXML" ); renderXML(input, c_response); } catch (Exception e) { log("catch (Exception e)" + e); } log("END of PDF"); </snip> Thanks, Hans Braumüller Braumüller wrote: > i am trying to generate pdf on fly from dynamic xml-source ... > What is wrong ? I have no idea. Would you care to describe what you expect, and what you got instead? Does your browser open a PDF viewer? Do you get error messages? Which messages? Can you download the expected content using a command line tool? BTW InputSource xmlSource = new InputSource(new StringReader(sReturnString)); In 99% of all cases I've seen this kind of code indicates either a major design flaw or that you are using the wrong tool to solve your problem. J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]