[GUMP] Build Failure - xml-fop
This email is autogenerated from the output from: http://jakarta.apache.org/builds/gump/2002-06-15/xml-fop.html Buildfile: build.xml init-avail: init-filters-xalan2: [copy] Copying 1 file to /home/rubys/jakarta/xml-fop/build/src/codegen init: [echo] --- Fop 1.0dev [1999-2002] prepare: [echo] Preparing the build directories [mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties [mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts [mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/svg [mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/conf [mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/hyph [copy] Copying 3 files to /home/rubys/jakarta/xml-fop/build/classes/conf codegen: [echo] Resetting codegen directory [copy] Copying 30 files to /home/rubys/jakarta/xml-fop/build/src/codegen [echo] Generating the java files from xml resources [style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/allprops.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/Constants.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/genconst.xsl [style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/fo_ignore_this.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/properties.xsl [style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/FOPropertyMapping.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/propmap.xsl [style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/foenums_ignore_this.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/enumgen.xsl [style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/charlist.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/CodePointMapping.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/code-point-mapping.xsl [style] Transforming into /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts [style] Processing /home/rubys/jakarta/xml-fop/src/codegen/CourierBold.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts/CourierBold.java [style] Loading stylesheet /home/rubys/jakarta/xml-fop/build/src/codegen/font-file.xsl [style] Processing /home/rubys/jakarta/xml-fop/src/codegen/Courier.xml to /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts/Courier.java [style] home/rubys/jakarta/xml-fop/build/src/codegen/font-file.xsl:0:0: Fatal Error! java.lang.RuntimeException: Programmer assertion is incorrect! - Namespace context can not be null! Cause: java.lang.RuntimeException: Programmer assertion is incorrect! - Namespace context can not be null! [style] Failed to process /home/rubys/jakarta/xml-fop/src/codegen/Courier.xml BUILD FAILED /home/rubys/jakarta/xml-fop/build.xml:431: Fatal error during transformation Total time: 29 seconds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[PATCH] Reload functionality in AWT preview window.
Hello! Just to get rid of necessity to relaunch fop during authoring of xsl to view changes I've added reloading functionality to PreviewDialog and AWTStarter classes. Here is the patch + image for reload button (I don't know how can I cvs the image, but it should be placed in org/apache/fop/viewer/Images). -- Oleg Tkachenko Multiconn International Ltd Index: apps/AWTStarter.java === RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/apps/AWTStarter.java,v retrieving revision 1.9.2.3 diff -u -r1.9.2.3 AWTStarter.java --- apps/AWTStarter.java1 Apr 2002 19:21:39 - 1.9.2.3 +++ apps/AWTStarter.java15 Jun 2002 16:17:09 - @@ -51,6 +51,8 @@ PreviewDialog frame; AWTRenderer renderer; +protected Driver driver; +protected XMLReader parser; public static String TRANSLATION_PATH = /org/apache/fop/viewer/resources/; @@ -62,7 +64,7 @@ init(); } -private void init() { +private void init() throws FOPException { try { UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel()); } catch (Exception e) { @@ -90,27 +92,24 @@ frame = createPreviewDialog(renderer, resource); renderer.setProgressListener(frame); renderer.setComponent(frame); -} - - -public void run() throws FOPException { -Driver driver = new Driver(); +driver = new Driver(); driver.setLogger(log); if (errorDump) { driver.setErrorDump(true); } - +driver.setRenderer(renderer); // init parser frame.progress(resource.getString(Init parser) + ...); -XMLReader parser = inputHandler.getParser(); - +parser = inputHandler.getParser(); if (parser == null) { throw new FOPException(Unable to create SAX parser); } +} -try { -driver.setRenderer(renderer); +public void run() throws FOPException { +driver.reset(); +try { // build FO tree: time frame.progress(resource.getString(Build FO tree) + ...); driver.render(parser, inputHandler.getInputSource()); @@ -119,6 +118,7 @@ frame.showPage(); } catch (Exception e) { +frame.reportException(e); if (e instanceof FOPException) { throw (FOPException)e; } @@ -129,7 +129,7 @@ protected PreviewDialog createPreviewDialog(AWTRenderer renderer, Translator res) { -PreviewDialog frame = new PreviewDialog(renderer, res); +PreviewDialog frame = new PreviewDialog(this, renderer, res); frame.validate(); frame.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent we) { Index: viewer/PreviewDialog.java === RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/viewer/PreviewDialog.java,v retrieving revision 1.7.2.1 diff -u -r1.7.2.1 PreviewDialog.java --- viewer/PreviewDialog.java 1 Apr 2002 19:21:39 - 1.7.2.1 +++ viewer/PreviewDialog.java 15 Jun 2002 16:17:12 - @@ -33,6 +33,8 @@ import org.apache.fop.layout.*; import org.apache.fop.render.awt.*; import org.apache.fop.messaging.*; +import org.apache.fop.apps.AWTStarter; +import org.apache.fop.apps.FOPException; /** * Frame and User Interface for Preview @@ -46,6 +48,7 @@ protected int pageCount = 0; protected AWTRenderer renderer; +protected AWTStarter starter; protected IconToolBar toolBar = new IconToolBar(); @@ -54,6 +57,8 @@ protected Command previousPageAction; protected Command nextPageAction; protected Command lastPageAction; +protected Command reloadAction; +protected Reloader reloader; protected JLabel zoomLabel = new JLabel();// {public float getAlignmentY() { return 0.0f; }}; @@ -74,6 +79,18 @@ protected JLabel infoStatus = new JLabel(); protected JLabel previewImageLabel = new JLabel(); + /** + * Create a new PreviewDialog that uses the given starter, renderer and +translator. + * + * @param aStarter the to use starter + * @param aRenderer the to use renderer + * @param aRes the to use translator + */ +public PreviewDialog(AWTStarter aStarter, AWTRenderer aRenderer, Translator aRes) +{ +this(aRenderer, aRes); +starter = aStarter; +} + /** * Create a new PreviewDialog that uses the given renderer and translator. * @@ -116,6 +133,12 @@ } }; +reloadAction = new Command(res.getString(Reload), reload) { +public void doit() { +reload(null); +} + +}; setDefaultCloseOperation(DISPOSE_ON_CLOSE); this.setSize(new Dimension(379, 476)); @@
Re: FopServlet
Nirupama Yalavarti wrote: But I have programmed that the pdf is saved to specific file(that is the way I want it) ie teh pdf generated be saved as a specific file in the server. But that doesnt seem to happen.I was expecting it to be saved in tomcat/bin. Any idea of setting something else for that? Thanks Nirupama This what I have written: ByteArrayOutputStream xslOut = new ByteArrayOutputStream(); byte[] pdfOutData = doRenderPDF(xslOut); response.setContentType(application/pdf); response.setContentType(application/pdf; name=\test12.pdf\); response.setHeader(Content-Disposition, inline;filename=\test12.pdf\); You should only set *one* of the above. response.setContentLength(pdfOutData.length); OutputStream resOut = response.getOutputStream(); resOut.write(pdfOutData); resOut.close(); Apart from this, you are writing your PDF to the servlet's output stream and therefore to the browser. The content-disposition setting is a hint for the *browser* on how to save the content if it chooses to. If you want to write to a file on the server, use something like FileOutputStream fos=new FileOutputStream(test12.pdf); fos.write(pdfOutData); fos.close(); J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: JimiException with TIFF
Padmanabhan, Shobana wrote: I get an error when I try to include a TIFF in the sample images.fo. If I replace this with a GIF, it works fine. Any pointers would be appreciated. The most likely cause is that Jimi doesn't understand the TIFF subformat, perhaps an unusual or patent protected compression. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FopServlet
--- J.Pietschmann [EMAIL PROTECTED] wrote: Nirupama Yalavarti wrote: But I have programmed that the pdf is saved to specific file(that is the way I want it) ie teh pdf generated be saved as a specific file in the server. But that doesnt seem to happen.I was expecting it to be saved in tomcat/bin. Any idea of setting something else for that? Thanks Nirupama This what I have written: ByteArrayOutputStream xslOut = new ByteArrayOutputStream(); byte[] pdfOutData = doRenderPDF(xslOut); response.setContentType(application/pdf); response.setContentType(application/pdf; name=\test12.pdf\); response.setHeader(Content-Disposition, inline;filename=\test12.pdf\); You should only set *one* of the above. response.setContentLength(pdfOutData.length); OutputStream resOut = response.getOutputStream(); resOut.write(pdfOutData); resOut.close(); Apart from this, you are writing your PDF to the servlet's output stream and therefore to the browser. The content-disposition setting is a hint for the *browser* on how to save the content if it chooses to. If you want to write to a file on the server, use something like FileOutputStream fos=new FileOutputStream(test12.pdf); fos.write(pdfOutData); fos.close(); J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Thanks , I figured that out... I could do that..THE file is being saved in jtomcat/bin Is there any way to change that location? may be to jtomcat/webapps/deployment directory ? = __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
SVG base URL exception
FOP is complaining about Could not set base URL for svg and refusing to draw a line. How does one set this URL? The version of FOP I'm using .20.1 Specifically, this XSL:FO... fo:block fo:instream-foreign-object svg xmlns=http://www.w3.org/2000/svg; width=6in height=0.1in gline stroke-width=0.05in stroke=#00 x1=0.4in y1=1.2in y2=1.2in x2=6in/line/g /svg /fo:instream-foreign-object /fo:block ...gives me this stack trace... [ERROR]: Logger not set [INFO]: building formatting object tree [INFO]: [1] [INFO]: [2] [ERROR]: [ERROR]: [ERROR]: Could not set base URL for svg java.net.MalformedURLException: java.lang.NullPointerException at java.net.URL.init(URL.java:496) at java.net.URL.init(URL.java:376) at java.net.URL.init(URL.java:330) at org.apache.fop.svg.SVGElement.layout(SVGElement.java:143) at org.apache.fop.fo.flow.InstreamForeignObject.layout (InstreamForeignObject.java:198) at org.apache.fop.fo.flow.Block.layout(Block.java:259) at org.apache.fop.fo.flow.Flow.layout(Flow.java:149) at org.apache.fop.fo.flow.Flow.layout(Flow.java:108) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:294) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178) I remember creating SVG lines in the past (must have been an older version of FOP) w/o errors like this. d - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]