cvs commit: xml-fop/src/org/apache/fop/svg PDFImageElementBridge.java PDFGraphics2D.java PDFTextPainter.java PDFTranscoder.java SVGUserAgent.java
keiron 01/10/11 23:40:13 Modified:src/org/apache/fop/image/analyser SVGReader.java src/org/apache/fop/layout LineArea.java src/org/apache/fop/render/svg SVGRenderer.java src/org/apache/fop/svg PDFGraphics2D.java PDFTextPainter.java PDFTranscoder.java SVGUserAgent.java Added: src/org/apache/fop/svg PDFImageElementBridge.java Log: changed api associated with batik to current batik added a half implemented bridge for jpg images Revision ChangesPath 1.12 +6 -1 xml-fop/src/org/apache/fop/image/analyser/SVGReader.java Index: SVGReader.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/analyser/SVGReader.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- SVGReader.java2001/09/25 12:32:36 1.11 +++ SVGReader.java2001/10/12 06:40:12 1.12 @@ -1,5 +1,5 @@ /* - * $Id: SVGReader.java,v 1.11 2001/09/25 12:32:36 keiron Exp $ + * $Id: SVGReader.java,v 1.12 2001/10/12 06:40:12 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -155,6 +155,11 @@ public String getLanguages() { return en; // userLanguages; } + +public String getMedia() { +return ; +} + /** * Returns the user stylesheet uri. 1.53 +2 -2 xml-fop/src/org/apache/fop/layout/LineArea.java Index: LineArea.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- LineArea.java 2001/10/05 11:20:04 1.52 +++ LineArea.java 2001/10/12 06:40:12 1.53 @@ -1,5 +1,5 @@ /* - * $Id: LineArea.java,v 1.52 2001/10/05 11:20:04 keiron Exp $ + * $Id: LineArea.java,v 1.53 2001/10/12 06:40:12 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -876,7 +876,7 @@ private String getHyphenationWord(char[] characters, int wordStart) { boolean wordendFound = false; int counter = 0; -char[] newWord = new char[100];// create a buffer +char[] newWord = new char[characters.length];// create a buffer while ((!wordendFound) ((wordStart + counter) characters.length)) { char tk = characters[wordStart + counter]; 1.2 +8 -11 xml-fop/src/org/apache/fop/render/svg/SVGRenderer.java Index: SVGRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/svg/SVGRenderer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SVGRenderer.java 2001/10/05 09:49:21 1.1 +++ SVGRenderer.java 2001/10/12 06:40:12 1.2 @@ -1,5 +1,5 @@ /* - * $Id: SVGRenderer.java,v 1.1 2001/10/05 09:49:21 keiron Exp $ + * $Id: SVGRenderer.java,v 1.2 2001/10/12 06:40:12 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -98,13 +98,6 @@ protected float currentBlue = 0; /** - * The parent component, used to set up the font. - * This is needed as FontSetup needs a live AWT component - * in order to generate valid font measures. - */ -protected Component parent; - -/** * options */ protected Hashtable options; @@ -607,9 +600,13 @@ throws IOException { DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); svgDocument = impl.createDocument(svgNS, svg, null); - -svgRoot = svgDocument.getDocumentElement(); -} +ProcessingInstruction pi = + svgDocument.createProcessingInstruction( + xml, + version=\1.0\ encoding=\ISO-8859-1\); + svgRoot = svgDocument.getDocumentElement(); +svgDocument.insertBefore(pi, svgRoot); + } public void stopRenderer(OutputStream outputStream) throws IOException { 1.19 +36 -8 xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java Index: PDFGraphics2D.java === RCS file:
cvs commit: xml-fop/lib batik.jar
keiron 01/10/11 23:44:09 Modified:lib batik.jar Log: updated batik lib to 12/10/2001 Revision ChangesPath 1.5 +3343 -3234xml-fop/lib/batik.jar Binary file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Fop speed improvements
Hi all, I'm generating a pdf from a servlet and although it's very easy to use, it's VERY slow and causes the browser to raise a timeout exception. I'm using a Pentium III 500 + 500 Mb + jdk1.3 machine and it takes 5 minutes to get a 2 pages document with no graphics, just one big table with 5 columns... Am I doing something wrong or fop is not ready for real-life ? FOP is not generally slow but under certain circumstances. Try to use the FOP command line application to render your PDF and watch the output. If you get lots of overflows, indicated by a or an INFO: line, you'll have to fiddle with column widths and maybe hyphenation to make this go away. You may also want to check keep-together attributes and such stuff that could cause FOP to iterate. If you could publish your FO file, preferably trimmed down to the a small part which is still slow, this would help to analyze the situation in more detail. (Please don't send a Megabyte file to the list!) HTH Joerg Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: ERRORS IN FOP
Hi Siarom, The problem is that your xsl file is generating a lot of formatting object structures and properties which are legal in the XSL specification, but which are not yet handled correctly by FOP. Many of these are in the extended conformance category, meaning they are the nice things to have but not part of the core product. Fop is still quite incomplete software. It can do a lot of useful work, but you have to try to live with its inadequacies. Most of the error messages you are getting indicate what FOP can't handle, but I'll give some more explanations. Fop documentation should have a list of what is and isn't supported, but it may well be incomplete or out of date--it changes as the developers add new things. margin property: this is XSL shorthand for top-margin, bottom-margin, left-margin, and right-margin. For FOP you will have to specify them individually. font property: this is another shorthand which Fop doesn't understand. Instead of font=bold 14pt Helvetica, you'll have to use separate attributes, like this : font-family=Helvetica font-weight=bold font-size=14pt reference-orientation and text-transform are not yet supported as the message says Ignore all the error messages like this about border-xxx-style: [ERROR]: Unknown enumerated value for property 'border-top-style': medium are actually false. In fact, Fop shouldn't print this, and it correctly interprets the border shorthand. But it only knows how to do border-style=solid. border and padding aren't supported on region-body. This is actually stated in the XSL specification Tables: this is why your xsl crashes completely. FOP needs table-rows to hold the table-cell objects. It doesn't yet know how to use the starts-row and ends-row properties on table-cell to simulate rows. It also needs to have a table-column object for each column, and a width attribute on the table with a fixed width. (I will soon commit some changes which implement proportional column widths, but you will still need the table-column and table-row objects). So in short, you will have to modify your XSL to make things more explicit for FOP. However, you should be able to get about the same result. Good luck, Karen Lease Siarom Egrub wrote: Hi All, Thanks for your input. I enclosed a copy of error.txt along with the XML and XSL files. These are just test files, as I am trying to get acquainted with FOP. Like I wrote in my earlier email to the group, I'm just getting started on FOP. I am not sure if these problems are cause due to environment settings. Sorry for been a pain!! Thanks for your help, S. Egrub Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com Name: error.txt error.txtType: Plain Text (text/plain) Encoding: 7bit Name: test.xsl test.xslType: unspecified type (application/octet-stream) Encoding: base64 Name: test.xml test.xmlType: unspecified type (application/octet-stream) Encoding: base64 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Fop speed improvements
Hi Pablo, I ran your xml and xsl files on my machine (800MHz, 256Mb RAM, Linux, JDK 1.3) and it ran in a 7 seconds using the fop command line from 0.20.2, which includes loading all the Java classes. It does look like you could generate more efficient FO, because your XSL currently makes one table for each line, each containing just one row. You could probably use 1 table with many rows instead. Also you are generating a couple of tables which have no table-column elements at all, which fop doesn't understand and skips. Try testing and refining your stylesheet using the command line interface. You can also just use an XSLT engine to generate an FO file directly so that you can see exactly what you are sending to FOP. However that isn't enough to explain the extreme slowness you see. There must be some other place in your servlet which is taking time. Good luck, Karen Lease Pablo Iaria wrote: The arquitecture I have is: 1) I call a stored procedure that answers a cursor. 2) Traversing that cursor I build the xml file. 3) I transform the xml file with a xsl to get a .fo 4) Finally I use fo to get the PDF file. The most time consuming task is the transfomation performed in step 4 5. Thanks, pablo.- PS: I'm sorry for my English, is not my natural language... - Original Message - From: Amit [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 11, 2001 3:03 PM Subject: Re: Fop speed improvements There are disclaimers stating that Fop is not ready for production level use. However many of us use it. I can generate 2+ page pdfs with graphics in less than 30 seconds...this is just to give you an idea. I a using JDK1.2.2 with 512MB of RAM If you could paste/attach your servlet code or the xml, xsl files someone might be able to take a look at it to see if something is going on there. Pablo Iaria wrote: Hi all, This is the second message I post about fop performance and I didn't got any answer; is there a way to make it faster or useable. I'm generating a pdf from a servlet and although it's very easy to use, it's VERY slow and causes the browser to raise a timeout exception. I'm using a Pentium III 500 + 500 Mb + jdk1.3 machine and it takes 5 minutes to get a 2 pages document with no graphics, just one big table with 5 columns... Am I doing something wrong or fop is not ready for real-life ? Thanks in advance, Pablo.- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] Name: report_19261.xml report_19261.xmlType: text/xml Encoding: quoted-printable Name: reporttable.xsl reporttable.xslType: text/xml Encoding: quoted-printable - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Antwort: Making a native win32 binary out of FOP
There appears to be a way to package the MS JVM together with some Java classes into an .exe. Mr. Kay (http://saxon.sourceforge.net/) does this for his Saxon XSLT processor. Maybe he is willing to help (he is also very busy, so be patient) Freundliche Gruesse Joerg Pietschmann ___ Zuercher Kantonalbank LIS4K / Geschaeftshaus Hard E Tel. +41 (0)1 275 85 03 Fax +41 (0)1 272 79 12 Briefe an: Postfach, 8010 Zuerich E-Mail:[EMAIL PROTECTED] Internet: http://www.zkb.ch Thomas KæregaardAn: [EMAIL PROTECTED] thk@vigilantKopie: e.com Thema: Making a native win32 binary out of FOP 10.10.01 10:19 Bitte antworten an fop-dev Hi List. I would like to distribute FOP with my application, but I don't want to force people to install 5,4 MB worth of JRE. Do any of you have experience regarding translation of FOP into an .exe-file (+ some .dll's probably) that will run directly from a win32 platform? Some sort of Java-win32 wrapper is acceptable, as long as it doesn't force us to install the JRE. Thanks in advance. - Thomas Kæregaard, Denmark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Making a native win32 binary out of FOP
On Wednesday 10 October 2001 10:19, Thomas Kæregaard wrote: I would like to distribute FOP with my application, but I don't want to force people to install 5,4 MB worth of JRE. Most likely you *will* have to distribute the JRE (unless you find a compatible java-to-exe compiler?). You might not need to *install* the JRE, though. Recent experiments here have shown that merely *copying* an installed JRE directory to another system works, as long as you're careful with PATH and the like to make sure that the desired version of the JRE is started. I don't know if this is official but it works fine. Starting java classes from an EXE is possible using JNI (the java native interface), this is done for example by the javaserv utility, see http://www.kcmultimedia.com/javaserv. -- -- Bertrand Delacrétaz, www.codeconsult.ch -- web technologies consultant - OO, Java, XML, C++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
startin Fop with Stream objects
I use Fop in a servlet to generate PDF output from dynamic generated data. To start fop in a servlet xml xsl resource have to be a file (according to FAQ). So I have to store my dynamic xml data in a file. But I want my Java Stream object to be passed to Fop. Is it possible ? Is it on todo list ? - Manfred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: startin Fop with Stream objects
Hi ! Don't know if this is helpful, but I am using the following code, to take a JDOM document which I input to FOP as a stream (inside the run method). I got most of this code from the JDOM faqs, and from other sources on the internet. Roger --- public static void renderFO(final Document doc, HttpServletResponse res) throws IOException, JDOMException, FOPException { // Use I/O streams for source files PipedInputStream sourceIn = new PipedInputStream(); final PipedOutputStream sourceOut = new PipedOutputStream(sourceIn); InputSource source = new InputSource(sourceIn); ByteArrayOutputStream out=new ByteArrayOutputStream(); res.setContentType(application/pdf); new Thread(new Runnable() { public void run() { try { XMLOutputter xmlOutputter=new XMLOutputter(); xmlOutputter.output(doc, sourceOut); sourceOut.close(); } catch (IOException e) { e.printStackTrace(); } } }).start(); Driver driver=new Driver(source, out); driver.run(); byte[] content=out.toByteArray(); res.setContentLength(content.length); res.getOutputStream().write(content); res.getOutputStream().flush(); } -Original Message- From: Ursprung Manfred [mailto:[EMAIL PROTECTED]] Sent: 12 October 2001 10:52 To: Fop-Liste (E-Mail) Subject: startin Fop with Stream objects I use Fop in a servlet to generate PDF output from dynamic generated data. To start fop in a servlet xml xsl resource have to be a file (according to FAQ). So I have to store my dynamic xml data in a file. But I want my Java Stream object to be passed to Fop. Is it possible ? Is it on todo list ? - Manfred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: startin Fop with Stream objects
Hi! Look into the API-Doku! There is a constructor: public Driver(org.xml.sax.InputSource source, java.io.OutputStream stream) And if you look into org.xml.sax.InputSource there is: InputSource(InputStream byteStream) Create a new input source with a byte stream. InputSource(Reader characterStream) Create a new input source with a character stream. InputSource(String systemId) Create a new input source with a system identifier. So there is no problem!!! Greetings Christian -Ursprüngliche Nachricht- Von: Ursprung Manfred [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 12. Oktober 2001 11:52 An: Fop-Liste (E-Mail) Betreff: startin Fop with Stream objects I use Fop in a servlet to generate PDF output from dynamic generated data. To start fop in a servlet xml xsl resource have to be a file (according to FAQ). So I have to store my dynamic xml data in a file. But I want my Java Stream object to be passed to Fop. Is it possible ? Is it on todo list ? - Manfred - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[REDESIGN] area tree
Hi All, So far I have only got a basic view of the area tree. I think the best way to deal with changes from this direction is to build the area tree and then change the renderers to handle the new area tree. This includes things like viewports. This will take some time it seems, then we need to look at making the layout engine create the areas. This may be done in a branch? There are some things that I'm still not sure how to handle or what is the best way. eg. inline level properties, background images for inline areas (groups), placement of table and list child areas in terms of area model. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[GUMP] Build Failure - Fop
This email is autogenerated from the output from: http://jakarta.apache.org/builds/gump/2001-10-12/xml-fop.html Buildfile: build.xml init-avail: init-filters-xalan1: init-filters-xalan2: [copy] Copying 1 file to /home/rubys/jakarta/xml-fop/build/src/codegen init: [echo] --- Fop 0.20.1 [1999-2001] 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 35 files to /home/rubys/jakarta/xml-fop/build/src/codegen [echo] Generating the java files from xml resources [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/allprops.xml [xslt] style: ./build/src/codegen/genconst.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/Constants.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/foproperties.xml [xslt] style: ./build/src/codegen/properties.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/fo_ignore_this.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/foproperties.xml [xslt] style: ./build/src/codegen/propmap.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/FOPropertyMapping.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/foproperties.xml [xslt] style: ./build/src/codegen/enumgen.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/foenums_ignore_this.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/extproperties.xml [xslt] style: ./build/src/codegen/properties.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/ext_ignore_this.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/extproperties.xml [xslt] style: ./build/src/codegen/propmap.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/ExtensionPropertyMapping.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/extproperties.xml [xslt] style: ./build/src/codegen/enumgen.xsl [xslt] out: ./build/src/org/apache/fop/fo/properties/extenums_ignore_this.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/charlist.xml [xslt] style: ./build/src/codegen/code-point-mapping.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/CodePointMapping.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/Courier.xml [xslt] style: ./build/src/codegen/font-file.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/Courier.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/Courier-Oblique.xml [xslt] style: ./build/src/codegen/font-file.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierOblique.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/Courier-Bold.xml [xslt] style: ./build/src/codegen/font-file.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierBold.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/Courier-BoldOblique.xml [xslt] style: ./build/src/codegen/font-file.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierBoldOblique.java [xslt] [xslt] [xslt] xslt [xslt] in: ./build/src/codegen/Helvetica.xml [xslt] style: ./build/src/codegen/font-file.xsl [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/Helvetica.java [xslt] [xslt] [xslt] xslt [xslt] in:
Re: TXTRenderer
Brian: We just started using it. Although it is a bit _ugly_ and the letter spacing is a bit off, our pages are OK. As we get more into TXT output, I'll let you know if I we see this. -Lou Brian T. Wolf [EMAIL PROTECTED] on 10/11/2001 07:51:49 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: TXTRenderer Is anyone else using the TXTRenderer? It seems that when I try it my pages all appear twice as wide as they are supposed to and the letter spacing is all funky. Is that already documented? If not, does anyone have any workarounds or ways to fix this? Thanks, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
HA: font issues with embedded SVG
The problem is that you are using SVG fonts. That is every character that is drawn is converted into a set of curves. The real problem is that the viewer (eg. acrobat) cannot display these curves very well. If you print out the document (on a decent printer) you will see that the text appears how it should. There is a limited implementation that does not draw the text as curves (using normal pdf text instead) but it doesn't handle many things well. just put this in you config file: entry keystrokeSVGText/key valuefalse/value /entry Some time ago I had the same problem, today i saw your post, and decided to try, but i still have the same result - letter that are rendered in SVG looks very ugly in acrobat and look nice on the paper. What do i do wrong? Or this solution will not help? I'm using FOP 0.20.1 -- Anton Dekusar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Slightly off topic, valid syntax
I was experimenting with fo:inline and I am not sure if this is valid? fo:blockText before fo:inline color=blueText inside/fo:inline Text after/fo:block When running thru FOP 0.20.2 it appears to work correctly (i.e. some text in black, then some text in blue, then some text in black), but I was wondering if this is valid syntax. Furthermore... is it valid xml? Thanks in advance Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Slightly off topic, valid syntax
Yes on both counts. - Original Message - From: Colin Savage [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 9:03 AM Subject: Slightly off topic, valid syntax I was experimenting with fo:inline and I am not sure if this is valid? fo:blockText before fo:inline color=blueText inside/fo:inline Text after/fo:block When running thru FOP 0.20.2 it appears to work correctly (i.e. some text in black, then some text in blue, then some text in black), but I was wondering if this is valid syntax. Furthermore... is it valid xml? Thanks in advance Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Slightly off topic, valid syntax
Thanks, I was too lazy to go hunting for the answer -Original Message- From: Scott Moore [mailto:[EMAIL PROTECTED]] Sent: 12 October 2001 03:01 To: [EMAIL PROTECTED] Subject: Re: Slightly off topic, valid syntax Yes on both counts. - Original Message - From: Colin Savage [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 9:03 AM Subject: Slightly off topic, valid syntax I was experimenting with fo:inline and I am not sure if this is valid? fo:blockText before fo:inline color=blueText inside/fo:inline Text after/fo:block When running thru FOP 0.20.2 it appears to work correctly (i.e. some text in black, then some text in blue, then some text in black), but I was wondering if this is valid syntax. Furthermore... is it valid xml? Thanks in advance Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: Slightly off topic, valid syntax
Hi! It is very correct XML! You can embedd tags in other tags surrounded by text without problems: fo:block Text before fo:inline color=blue Text inside /fo:inline Textafter /fo:block Christian -Ursprüngliche Nachricht- Von: Colin Savage [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 12. Oktober 2001 15:04 An: '[EMAIL PROTECTED]' Betreff: Slightly off topic, valid syntax I was experimenting with fo:inline and I am not sure if this is valid? fo:blockText before fo:inline color=blueText inside/fo:inline Text after/fo:block When running thru FOP 0.20.2 it appears to work correctly (i.e. some text in black, then some text in blue, then some text in black), but I was wondering if this is valid syntax. Furthermore... is it valid xml? Thanks in advance Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Performance
Joerg, What did you mean by this -- FOP is not generally slow but under certain circumstances. Try to use the FOP command line application to render your PDF and watch the output. If you get lots of overflows, indicated by a "" or an "INFO: " line, you'll have to fiddle with column widths and maybe hyphenation to make this go away. You may also want to check "keep-together" attributes and such stuff that could cause FOP to iterate. -- I had no idea that all those ''s meant something. What do you mean by overflows? What do you mean by 'cause FOP to iterate'? I'm seeing a 30-100 page table generated in 5-15 minutes and frequently running out of memory even though I set the heap size to 1GB. Thanks, Joe
Embedding Printer Control parameters in PCL
Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - Original Message - From: Art Welch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 11, 2001 4:11 PM Subject: RE: orientation Off hand I do not know of an easy way to do this. Depending on how you are invoking FOP it may be possible to have an XSL stylesheet call an extension function to signal to the code that is invoking the PCLRenderer to set the orientation as desired. Unfortunately the orientation is set in startRenderer() so this would need to be done before that. HTH, Art -Original Message- From: Brian Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 09, 2001 4:19 PM To: [EMAIL PROTECTED] Subject: orientation I am trying to utilize the code in PCLRenderer that will send the landscape escape sequence. Unfortunately I cannot seem to figure out how to pass the information from the stylesheet to the renderer. If someone is already working on this I can wait a little bit; otherwise any advice on how to proceed to make the coding changes would be appreciated. Thanks, Brian Brian T. Wolf CBILL, INC. 3452 E. Foothill Blvd., Suite 400 Pasadena, CA 91107 (626) 844-6361 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Antwort: Performance
Joe Batt [EMAIL PROTECTED] wrote: Joerg, What did you mean by this -- FOP is not generally slow but under certain circumstances. Try to use the FOP command line application to render your PDF and watch the output. If you get lots of overflows, indicated by a or an INFO: line, you'll have to fiddle with column widths and maybe hyphenation to make this go away. You may also want to check keep-together attributes and such stuff that could cause FOP to iterate. -- I had no idea that all those ''s meant something. It's documented somewhere. If '' appears, it means that the processor encountered difficulties while laying out a page and that your output might look ugly or at least not as you planned. What do you mean by overflows? What do you mean by 'cause FOP to iterate'? Simplified and from hazy memory: A FO processor reads the FO input, then it tries to determine where on the pages which text and graphics has to be placed. In order to achieve this, the text and graphics is placed in little boxes, and constraints for their size and position are determined from the structure and attributes of the FO in the source. It may be somewhat difficult or even impossible to determine the size of a box around a particular text snippet. For example, if you have a table with a column 20pt wide, and a cell in this column with averyveryveryveryveryveryloongword, which, when rendered, is wider than the column width. This is called overflow. There are other overflows possible when the processor places tentatively a text box at a certain place, and finally discovers the text doesn't fit the box, for example a table cell which is placed near the bottom of a page and which contains a block with a lot of text. Rather then breaking the page in the middle of the block, it is spilled over to the next page. There are situations where you can make it very difficult for the processor, for example by including a graphic higher than the page body. Because it won't fit ever, the processor tries to spill it onto the next page until it runs out of memory... I'm seeing a 30-100 page table generated in 5-15 minutes and frequently running out of memory even though I set the heap size to 1GB. I had this symptom too when i started. Check whether you generate table cells which are approaching the height of a page, either by having a lot of text in it or by including a lot of space. FOP appears to be unable to split table cells, probably because it requires the content of a table cell wrapped in a single fo:block (some comments from the developers?) You could try: - Enable hyphenation: fo:block hyphenate=true language=en or something. This will fit more characters on a line and may thereby reduce table cell height. - Split long texts over multiple rows, thereby ease the task of FOP to fit the cells onto a page. Not exactly easy to solve in general, but your data may permit a simple solution (for example if long texts appear only in a certain column). If you really have difficulties and you cannot hire a more advanced expert, you'll probably have to study the XSL-FO specification and the FOP documentation in detail by yourself in order to get further hints. And, well, FOP is not exactly programmed to use as little space as possible. Stuff is copied a lot and often still hangs around in memory long after it isn't needed anymore, though this improved with 0.20's stream rendering. Joerg Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: The Position of my table in a body-content [FAQ]
Hi Serge, in theory, the solution would be to add the property display-align=center to your region-body. As this does not yet work, this is the current work-around: - Define a table consisting of a single cell, with * table-column as wide as the region-body * table-row as high as the region-body - Add the property display-align=center to your single cell. - The content of your single cell will then be your table. This works fine for me. HTH, Corinna - Original Message - From: Serge Pagop [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 11, 2001 7:28 PM Subject: The Position of my table in a body-content Hi all, I have a Problem, I think someone can help to resolve this problem. I want to put my table in the center my body-content but I don't know, how I can do that. Any help would be appreciated thanks. -- [EMAIL PROTECTED] MATHEMA AG Nägelsbachstraße 25 b 91052 E r l a n g e n Telefon 09131/8903-0 Telefax 09131/8903-55 http://www.mathema.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Table Layout with Page Breaks
Title: Table Layout with Page Breaks Hi, Yuri, generally the property keep-with-next should work. I tested it with FOP 0.20.1 successfully. I'm not quite sure if the hassle Darren creates by using nested tables is a must-have. You should achieve the same results by using keep-with-next for every row on your table. Single disadvantage (as in Darren's solution): if somehow a table doesn't fit on a single page (or Darrens row becomes bigger than a page) you might run into an endless loop. That is a known problem and (hopefully ;)) being worked on. HTH, Corinna - Original Message - From: West, Chris To: '[EMAIL PROTECTED]' Sent: Thursday, October 11, 2001 1:30 AM Subject: Table Layout with Page Breaks I'm using fop to generate tables that vary in length, so I need to be able set attributes such that the table layout will accommodate page breaks. I've tried using "keep-with-next" applied to fo:table-row and "height" applied to fo:table (plus many others) to setup the table layout so that it isn't truncated by a new page, but haven't had much success. Does FOP support this functionality? Chris W.
Modifications on 'Fop as Servlet'
Hallo, I made some modifications on FopServlet. A war file is available for configuration in a web application. A short explanation is also provided in the ReadMe.txt file. I am sending you, here with, a zip file with the new version. till next time, Bedilu Habte. ___ 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de [EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de fop2Servlet.zip Description: Zip compressed data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
XML and XSL from streamed sources (Database fields)
I have got the default FOP code working generating PDF file based on local example files. My source data does not reside on the local PC. I have the XSL file on a web server and the XML data in an SQL server database field. I have written a Java application that works fine with the local files but am struggling with the XSLTInputHandler require File types for the source data. e.g. File xmlfile = new File(c:\\xslforef.xml); // CAN THESE FILES BE STREAMED INTO THE XSLINPUTHANDLER SOME HOW File xslfile = new File(c:\\xml2pdf.xsl); // CAN THESE FILES BE STREAMED INTO THE XSLINPUTHANDLER SOME HOW Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); UpdateStatus(Parsing input files); //InputHandler inputHandler = new XSLTInputHandler(XMLData, xslFile); InputHandler inputHandler = new XSLTInputHandler(in,out); Thanks Mike Seal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 4126] New: - FontState.width() returns pts instead of millipts
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4126. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4126 FontState.width() returns pts instead of millipts Summary: FontState.width() returns pts instead of millipts Product: Fop Version: all Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The following method in org.apache.fop.layout.FontState seems to be wrong: public int width(int charnum) { // returns width of given character number in millipoints return (_metric.width(charnum, _fontSize) / 1000); } It returns the width of the character in points, not millipoints. Since the result is an integer, the significant digits to the right of the decimal point are lost. I think the method should just return the metric width directly as follows: public int width(int charnum) { // returns width of given character number in millipoints return _metric.width(charnum, _fontSize); } I came across this bug when trying to find the width of a String using the method public float getStringWidth(String str) in the class org.apache.fop.svg.PDFTextPainter. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: TXTRenderer
You didn't provide many other details, so if assuming your using a stylesheet of some kind, have you tried xsl:stylesheet xsl:output method="text" indent="yes[or no]"/ ...the rest of the stylsheet... /xsl:stylesheet? You'd have more control over the output. Hope this helps, Matthew L. AvizinisGleim Publications, Inc.4201 NW 95th Blvd.Gainesville, FL 32606(352)-375-0772 ext. 101www.gleim.com -Original Message-From: Brian T. Wolf [mailto:[EMAIL PROTECTED]]Sent: Thursday, October 11, 2001 7:52 PMTo: [EMAIL PROTECTED]Subject: TXTRenderer Is anyone else using the TXTRenderer? It seems that when I try it my pages all appear twice as wide as they are supposed to and the letter spacing is all funky. Is that already documented? If not, does anyone have any workarounds or ways to fix this? Thanks, Brian
Re: Embedding Printer Control parameters in PCL
We are working on that as well, though I don't have any good solutions yet either. If you run across something please let me know. Just as an FYI, I tried hardcoding a duplex print escape sequence into PCLRenderer.java and it printed both sides as expected. So I figure once we solve how to pass through the landscape code, this should be resolved as well. There is more to this than a FOP coding issue I believe however. The xsl:fo standard has nothing to do with how a particular printer should behave. So we also need to figure out how to get the information from the stylesheet to the renderer without damaging the integrity of the xsl. Regards, Brian - Original Message - From: Raj [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 12, 2001 7:45 AM Subject: Embedding Printer Control parameters in PCL Hi Art, I am trying to send fop generated PCL from web server to network printers. For each document, we know the print controls(like duplex etc.) Is there a way to embed these controls as part of the PCL stream so that duplex prints are automatically delivered as duplex without any other intervention. All our printers support duplex printing. Thanks -rajendran. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Table Layout with Page Breaks
Corinna, Indeed, keep-with-next does work when set for each row. But you scared me with the endless loop comment, so for now I would keep my stylesheets the way I had them. Somewhat related question: I am using space-before for those short tables to leave some white space between them, but if the page break happens right after a table, the following table on the next page will be shifted down, e.g. __ page 1 starts table 1 --- required gap table 2 --- required gap table 3 __ page 2 starts --- unnecessary gap table 4 Is there any way to avoid this gap? YS -Original Message- From: Corinna Hischke [mailto:[EMAIL PROTECTED]] Sent: Friday, October 12, 2001 12:56 PM To: [EMAIL PROTECTED] Subject: Re: Table Layout with Page Breaks Hi, Yuri, generally the property keep-with-next should work. I tested it with FOP 0.20.1 successfully. I'm not quite sure if the hassle Darren creates by using nested tables is a must-have. You should achieve the same results by using keep-with-next for every row on your table. Single disadvantage (as in Darren's solution): if somehow a table doesn't fit on a single page (or Darrens row becomes bigger than a page) you might run into an endless loop. That is a known problem and (hopefully ;)) being worked on. HTH, Corinna - Original Message - From: West, Chris mailto:[EMAIL PROTECTED] To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, October 11, 2001 1:30 AM Subject: Table Layout with Page Breaks I'm using fop to generate tables that vary in length, so I need to be able set attributes such that the table layout will accommodate page breaks. I've tried using keep-with-next applied to fo:table-row and height applied to fo:table (plus many others) to setup the table layout so that it isn't truncated by a new page, but haven't had much success. Does FOP support this functionality? Chris W. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: TXTRenderer
What I meant was have you tried the following in place of using the fop text renderer option. If text output is what you want, then you really wouldn't need fop at all; your XSLT engine would produce the output you want. You didn't provide many other details, so if assuming your using a stylesheet of some kind, have you tried xsl:stylesheet xsl:output method="text" indent="yes[or no]"/ ...the rest of the stylsheet... /xsl:stylesheet? You'd have more control over the output. Hope this helps, Matthew L. AvizinisGleim Publications, Inc.4201 NW 95th Blvd.Gainesville, FL 32606(352)-375-0772 ext. 101www.gleim.com -Original Message-From: Brian T. Wolf [mailto:[EMAIL PROTECTED]]Sent: Thursday, October 11, 2001 7:52 PMTo: [EMAIL PROTECTED]Subject: TXTRenderer Is anyone else using the TXTRenderer? It seems that when I try it my pages all appear twice as wide as they are supposed to and the letter spacing is all funky. Is that already documented? If not, does anyone have any workarounds or ways to fix this? Thanks, Brian
[ANN] XSLfast: Authoring tool for XSL-FO
Dear subscribers, after a long development period, we have finaly released the very first version of XSLfast for public review and test. *** XSLfast is the first graphical editor for authoring XSL-FO *** Beside editing XSL-FO, XSLfast also allows to do mail merging and forms processing. You can create an XSL-FO template and attach XML data with this template. XSLfast automatically creates XSLT files for transfering XML data into the template and allows to merge, create and preview the result. The evaluation version is as functional as a first release can be (internal version number is 0.8). The version is available from: http://www.xslfast.com/ Best Regards Stephan Albers jCatalog Software AG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Performance
Hello Joerg FOP appears to be unable to split table cells, probably because it requires the content of a table cell wrapped in a single fo:block (some comments from the developers?) FOP does split table cells. My experience is that this happens more than I want it to be happen. For example when putting 2 blocks in a cell and specifying the first one as keep-with-next. The blocks are splitted. fo:table-cell requires at least one block-level child (block or image etc) or nothing. regards, Enrico - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
PCLRenderer border problem
I have just committed a change to the PCLRenderer that should correct the incorrectly printed borders. Unfortunately because I am stuck with JDK 1.1.8 I can not easily test the changes. I implemented a change to the CVS version that I had done to a modified version that we have been running for a while. I believe that this corrects the problem, but I would appreciate feedback from people using the PCLRenderer if it is actually fixed. Thank You, Art - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]