DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42845>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42845 ------- Additional Comments From [EMAIL PROTECTED] 2008-01-16 00:03 ------- I got some mor information today. It seems as if the problem mainly occurs under the following circumstances: 1) XML is generated 2) XML is transformed using XSL-FO and FOP called via JavaScript 3) immediately after the transformation the PDF is shown using a JavaScript-Call 4) if you print now the error may occur Is it possible that on a slow machine, the pdf file is not completely written (buffer not completely emptied) while the FOP process signals the system it is ready and now acrobat opens a file where e.g. some crucial font information at the end of the file is not available, yet? When you open the file a second time the file is complete and therefore one can print it... I know the description above sounds quite unlikely but if one takes into account that the problem occurs quite rarely and is not reproducable with the same generated document, maybe its possible. The source for step two and three is attached below. The source for step 2 and 3: // create an ActiveXObject and declare some general stuff var aShell = new ActiveXObject("WScript.Shell"); var sPathRoot = window.top.BTMDB.RootURL + "pdf"; var sPathFOP = sPathRoot + "\\fop"; var sPathJava = window.top.BTMDB.RootURL + "\\jre\\jre1.6.0_03\\bin\\java"; var sPathBuild = sPathFOP + "\\build"; var sPathLib = sPathFOP + "\\lib"; // transform file to PDF var arg = "\"" + sPathJava + "\" "; arg += "-cp \""; arg += sPathBuild + "\\fop.jar;"; arg += sPathLib + "\\xml-apis.jar;"; arg += sPathLib + "\\xercesImpl.jar;"; arg += sPathLib + "\\xalan.jar;"; arg += sPathLib + "\\serializer.jar;"; arg += sPathLib + "\\batik-all.jar;"; arg += sPathLib + "\\xmlgraphics-commons.jar;"; arg += sPathLib + "\\avalon-framework.jar;"; arg += sPathLib + "\\commons-io.jar;"; arg += sPathLib + "\\commons-logging.jar;\" "; arg += "org.apache.fop.cli.Main "; arg += "-xml " + sXmlUrl + " "; arg += "-xsl " + sXslUrl + " "; arg += "-pdf " + sPdfUrl + " "; arg += "-nocopy " + " "; arg += "-noedit " + " "; arg += "-noannotations"; // run (<application & params>, <[0|1] - process in background|foreground>, // <[true|false] wait till finished> var nEcode = aShell.Run (arg, 0, true); if (nEcode != 0) { alert ("[ErrPDF-01]\nError while transforming. Send file:\n-> " + sXmlUrl + "") window.top.TransferToCCA9 (sXmlUrl); return; } // show result if (bShowPdf) { var arg = "cmd /c \"" + sPdfUrl; // run (<application & params>, <[0|1] - process in background|foreground>, // <[true|false] wait till finished> aShell.Run (arg, 0, false); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
