fop-0.20.3rc2 problems
Hi Christian, There is one problem with the rc2. It appears that the TextState, ts, is not initialised in FObjMixed. Causing the following error. java.lang.NullPointerException at org.apache.fop.fo.FObjMixed.addCharacters(FObjMixed.java:47) at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:166) This happens with the markers example, glossary.xml, glossary.xsl. As for the logger, maybe this should be updated to the latest version rather than b4. Keiron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: [REDESIGN] TextLayoutManager whitespace handling
Hi Karen, I seem to be having a bit of trouble getting that text parsing right. I was mainly just trying to get something to work to see on the output. It should be able to be simplified thanks to the earlöier whitespace handling. I still wonder what should be done in a situation like: blocksome text inline text-decoration=underline more textinlineblock Is the space before more underlined or not? Keiron. On 2002.02.23 18:30 [EMAIL PROTECTED] wrote: Keiron, I see you've actually started to make TextLayoutManager do something. I noticed during my CTM testing with the PDF renderer, that it's eating the first character of my text, ie. Hello world came out as ello world. Since I don't think you're French which could account for not pronouncing the 'h', I thought it might be due to the 'wordStart + 1' used to set the text for the Word Area. I also noticed there's a lot of whitespace handling in the code still. A few months ago I put some white-space handling into the FO tree building logic. In fo.flow.Block.end(), it basically iterates over all its kids and tries to get rid of all the unnecessary white-space before it gets to the layout manager. The idea was that the LM would only see the whitespace it was actually supposed to layout and the linefeeds which were real line-break characters. I haven't studied the new TextLM code in detail, but I would think it could be simplified based on that approach. Regards, Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: problem building on macosx
Do you have multiple JVMs installed, or have you recently added the release version of JDK 1.4? I had a similar set of problems early this week. When I uninstalled JDK 1.3, and re-installed it, I was able to get FOP building and running again with 1.3. I had been experiencing strange errors (ClassFormatError, wrong major/minor version, etc) for the first day or so after I installed JDK 1.4. This was on Windows 2000, however. I found the only JAVA_HOME in the registry pointed to the 1.4 install, no matter what I set for the environment variables in Control Panel. It seems the registry value somehow overrides the environment. Putting tools.jar explicitly on the classpath allowed Ant to start, but it always failed. The prebuilt fop.jar would die with the class format problem. If you have added or changed the VM settings, and 1.4 is involved, then perhaps Mac has a system setting somewhere that the 1.4 VM sets at install and looks for when running. I didn't get to see the actual error until I changed fop.sh to use verbose on java. Maybe adding verbose to the build.xml will help getting to the bottom of this issue. A lot of ifs, I know. Hope it helps. Joe Stephen Bannasch To: [EMAIL PROTECTED] stephen@conco cc: rd.org Subject: Re: problem building on macosx 02/27/2002 06:04 PM Please respond to fop-dev Thanks for the suggestion, but the same problem occurs. In an earlier mail you said you had this line in your shell profile: export ANT_HOME=/Users/stephen/devtools/jakarta-ant-1.4.1 Maybe that is causing ant to look for tasks in that directory rather than in the fop lib? Try setting ANT_HOME to /Users/stephen/apache/xml-fop/lib or wherever the buildtools.jar is. Regards, Karen Stephen Bannasch wrote: What happens if you remove hyphenation from this line target name=package depends=compile,hyphenation in build.xml? same error: init: [echo] --- Fop 0.20.3 [1999-2002] BUILD FAILED /Users/stephen/apache/xml-fop/build.xml:272: taskdef class org.apache.fop.tools.anttasks.SerializeHyphPattern cannot be found If I comment out line 272: !-- taskdef name=serHyph classname =org.apache.fop.tools.anttasks.SerializeHyphPattern/ -- taskdef name=xslt classname =org.apache.fop.tools.anttasks.Xslt/ then it dies on the next taskdef on line 273 -- -s - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [REDESIGN] TextLayoutManager whitespace handling
Hi, Keiron My gut feeling is that with an initial score-spaces value of true, and since 6.6.3 tells us that we treat characters as fo:character, and score-spaces is applicable to fo:character, I would say that the underline applies to the space. Regards, Arved -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: February 28, 2002 5:06 AM To: [EMAIL PROTECTED] Subject: Re: [REDESIGN] TextLayoutManager whitespace handling Hi Karen, I seem to be having a bit of trouble getting that text parsing right. I was mainly just trying to get something to work to see on the output. It should be able to be simplified thanks to the earlöier whitespace handling. I still wonder what should be done in a situation like: blocksome text inline text-decoration=underline more textinlineblock Is the space before more underlined or not? Keiron. On 2002.02.23 18:30 [EMAIL PROTECTED] wrote: Keiron, I see you've actually started to make TextLayoutManager do something. I noticed during my CTM testing with the PDF renderer, that it's eating the first character of my text, ie. Hello world came out as ello world. Since I don't think you're French which could account for not pronouncing the 'h', I thought it might be due to the 'wordStart + 1' used to set the text for the Word Area. I also noticed there's a lot of whitespace handling in the code still. A few months ago I put some white-space handling into the FO tree building logic. In fo.flow.Block.end(), it basically iterates over all its kids and tries to get rid of all the unnecessary white-space before it gets to the layout manager. The idea was that the LM would only see the whitespace it was actually supposed to layout and the linefeeds which were real line-break characters. I haven't studied the new TextLM code in detail, but I would think it could be simplified based on that approach. Regards, Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo FObjMixed.java
chrisg 02/02/28 04:20:02 Modified:src/org/apache/fop/fo Tag: fop-0_20_2-maintain FObjMixed.java Log: quick fix for Markers (thanks to Keiron) Revision ChangesPath No revision No revision 1.12.2.3 +6 -4 xml-fop/src/org/apache/fop/fo/FObjMixed.java Index: FObjMixed.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObjMixed.java,v retrieving revision 1.12.2.2 retrieving revision 1.12.2.3 diff -u -r1.12.2.2 -r1.12.2.3 --- FObjMixed.java9 Jan 2002 11:32:57 - 1.12.2.2 +++ FObjMixed.java28 Feb 2002 12:20:02 - 1.12.2.3 @@ -1,5 +1,5 @@ /* - * $Id: FObjMixed.java,v 1.12.2.2 2002/01/09 11:32:57 keiron Exp $ + * $Id: FObjMixed.java,v 1.12.2.3 2002/02/28 12:20:02 chrisg 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. @@ -44,9 +44,11 @@ // addChild(new FOText(data, start, length, this)); FOText ft = new FOText(data, start, length, this); ft.setLogger(log); -ft.setUnderlined(ts.getUnderlined()); -ft.setOverlined(ts.getOverlined()); -ft.setLineThrough(ts.getLineThrough()); +if (ts != null) { +ft.setUnderlined(ts.getUnderlined()); +ft.setOverlined(ts.getOverlined()); +ft.setLineThrough(ts.getLineThrough()); +} addChild(ft); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop-0.20.3rc2 problems
Keiron Liddle wrote: Hi Christian, There is one problem with the rc2. It appears that the TextState, ts, is not initialised in FObjMixed. Causing the following error. java.lang.NullPointerException at org.apache.fop.fo.FObjMixed.addCharacters(FObjMixed.java:47) at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:166) This happens with the markers example, glossary.xml, glossary.xsl. Fixed. (seems like I'm to blame for this bug .. we definitely need more tests) Thanks Keiron! As for the logger, maybe this should be updated to the latest version rather than b4. Latest version is 1.0.1, seems like we just can replace the jar. I'll try it this evening and if I notice no problems I'll make the release. Keiron. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Options
Jeremias, Jeremias Maerki wrote: Peter (comments inline) In config.xml: entry keyuserConfigFileName/key valueuserconfig.xml/value /entry Ok, that means FOP looks in the current directory for userconfig.xml. I can agree with that. I guess there are pros and cons: This mechanism can reduce the work that needs to be done to get FOP running in embedded mode. But on the other hand, I'm not sure if it cuts on flexibility when you want to provide a special configuration. Then you use the command line. entry keylanguageConfigFileName/key valuexml-lang.xml/value /entry (More on languageConfigFileName later.) In userconfig.xml, allow things like entry keyfoFileName/key value/home/pbw/public_html/xml/newtest3.fo/value /entry entry keyinputMode/key valuefo/value /entry entry keyfoFileName/key value/home/pbw/public_html/xml/newtest3.fo/value /entry entry keyoutputMode/key valuepdf/value /entry entry keyoutputFileName/key value/home/pbw/public_html/xml/newtest3.pdf/value /entry Now, I think you're really start mixing things. I strongly recommend to separate configuration (as the filename says) and processing instructions. What you want to do means creating a new userconfig.xml for each call to FOP. This is much easier using the command line (and faster). Any other opinions? No, it doesn't mean creating a new userconfig file for each invocation; that's what the command line is for. It's a convenience for special requirements for, e.g., developers. Command line trumps userconfig. Is it nice? No. Is it useful? Yes. In any case, it seems that in Java environments, the command line may not be the best way to pass such things around. What do you do on a Mac? The language file (see attached) is just a validation mechanism for certain attribute/property values. It (currently) requires the org.apache.fop.configuration.LanguageFileReader class which reads the xml-lang.xml file and builds three HashMaps, which are installed in Configuration. I don't get you here. What do you need the language validation for? For completeness. I can specify country, language and script, and these may be acted upon in respect of hyphenation. Two situations may arise. 1) That particular language/country/script may have no support in this version of FOP. 2) There is no such language/country/script. When I'm parsing one of these attributes, I like to be able to detect the second situation at the point of parsing. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
C# version of FOP
I have been working on converting FOP to C# for a project I'm working on. I currently have a C# version producing EMF page images from the example FOP files from 0.20.3rc. I'm producing EMF right now since that is the specific format my application requires. To ease my conversion effort I backed out the SVG code (so I wouldn't have to convert Batik yet) and I removed the PDFRenderer (since I'm not interested in PDF currently). I focused on converting the AWTRenderer to produce EMF page images. I don't think it will be that much work to add the PDFRenderer back in later -- minus SVG of course. I wanted to find out if any of you are interested in a C# version of FOP or, if not, then if you could direct me to a group that might be. I would like to get an a open source group started on developing this version further. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Options
Hi Peter snip/ Now, I think you're really start mixing things. I strongly recommend to separate configuration (as the filename says) and processing instructions. What you want to do means creating a new userconfig.xml for each call to FOP. This is much easier using the command line (and faster). Any other opinions? No, it doesn't mean creating a new userconfig file for each invocation; that's what the command line is for. It's a convenience for special requirements for, e.g., developers. Command line trumps userconfig. Is it nice? No. Is it useful? Yes. In any case, it seems that in Java environments, the command line may not be the best way to pass such things around. What do you do on a Mac? You'll have to create a GUI or use OS X. :-) Well, that leads me to the question: What are you actually trying to do? We're talking about solutions here, but not what you need them for (I think). The language file (see attached) is just a validation mechanism for certain attribute/property values. It (currently) requires the org.apache.fop.configuration.LanguageFileReader class which reads the xml-lang.xml file and builds three HashMaps, which are installed in Configuration. I don't get you here. What do you need the language validation for? For completeness. I can specify country, language and script, and these may be acted upon in respect of hyphenation. Two situations may arise. 1) That particular language/country/script may have no support in this version of FOP. 2) There is no such language/country/script. When I'm parsing one of these attributes, I like to be able to detect the second situation at the point of parsing. I'm lost. Sorry, but I really can't follow you. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP0.20.3
Markers are broken in Fop-0.20.3rc2 the presence of an fo:marker tag -- error I don't know if this should be entered as a bug since markers were not completely implemented previously [INFO]: FOP 0.20.3rc [INFO]: building formatting object tree [ERROR]: null Here is the sample test.fo ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=simple margin-top=1in margin-right=1in margin-left=1in margin-bottom=1in fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=simple fo:flow flow-name=xsl-region-body fo:blockfo:marker marker-class-name=entryOne/fo:marker this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test /fo:block /fo:flow/fo:page-sequence/fo:root Chuck Paussa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
Keiron Liddle [EMAIL PROTECTED] wrote: XML input - various ways to supply FOP with the xsl:fo file I might be an idea to rely on JAXP 1.1 here. general options - base directory Make this base URI. Make sure your concept allows resolving those pesky url(#stuff) properties in embedded SVGs generated by a transformation, which may mean baseURI is not constant, or that you need more than one baseURI. AFAIK Batik doesn't provide for user supplied URI resolving code either, so it's probably necessary to talk to them. I want to note that several code pieces for resolving URLs and/or file locations are scattered all over FOP and Batik. Replacing them all with an URIResolver invocation would unify behaviour and remove redundancies. I'd also recommend to lift the default URIResolver implementation from Saxon, it seems to tolerate the usual abuse better than everything else i came across elsewere. Keep up the good work! J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using Avalon/Logkit
From: Joerg Pietschmann [EMAIL PROTECTED] Jeremias Maerki [EMAIL PROTECTED] wrote: Ok, I think that can be done, even when using Avalon in FOP. You propose (I think) that we could provide an Avalon-Wrapper around FOP, Thanks for the help. Some comments on the concerns: I'm forced to use JDK 1.3 with JAXP1.1 and proprietary extensions for logging and configuration management (and other stuff i'll ignore now). I have to use the proprietary API to retrieve configurable options and want to feed them to a FOP instance. It's not easy for me to deploy a config file, nor do i want to. My purposes would be served best if there were a processor class which took all configuration options as a Properties bundle or through some generic interface like Transformer does. An avalon component class encapsulating the simple processor class (or derived, for possible performance gains) could use this interface to pass options read from a config file, command line options or whatever. Avalon can really help you here. If FOP is completely Avalonized, you can plug in you own implementations of logging or configuration Management without changing the core FOP code. Avalon gives you these services using interfaces; this way any implementation can be used. but it could also be the other way around. I'm sure that Avalon will not stand in the way if we provide a simple interface similar to what you proposed. Well, adding is easier than subtracting. Apart from the interface, i don't want to have FOP looking around for files (URIs are ok, if i could supply code to resolve them). Can somebody explain to me what could be gained if the processor was an avalon component by default (other than easy integration into the avalon framework, of course)? It automatically gets the possibility of using all Avalon services. Instead of explaining all possibilities, let me show you an example of the Avalon way. Let's say that you write your class: public class MyClass { public MyClass{} } Now you want it to get created and managed by Avalon. So you define it in a config file (or programmatically)and change it to: public class MyClass implements Component{ public MyClass{} } This way, when Avalon starts, it creates you class. Now you want it to get some configuration. public class MyClass implements Component, Configurable{ public MyClass{} public void configure(Configuration conf) { //use conf here } } The Configuration it gets is gotten from *any* class that uses that interface; Avalon will supply it to you. Now you know that your configuration can change, so you write: public class MyClass implements Component, Configurable, Reconfigurable{ public MyClass{} public void configure(Configuration conf) { //use conf here } public void reconfigure(Configuration conf) { //use conf here } } now you want to add some init code: public class MyClass implements Component, Configurable, Reconfigurable, Initializable{ public MyClass{} public void configure(Configuration conf) { //use conf here } public void reconfigure(Configuration conf) { //use conf here } public void initialize() { //initialization code } } now you want to add some lifecycle code: public class MyClass implements Component, Configurable, Reconfigurable, Initializable, Startable{ public MyClass{} public void configure(Configuration conf) { //use conf here } public void reconfigure(Configuration conf) { //use conf here } public void initialize() { //initialization code } public void start() { //start code } public void stop() { //stop code } } now you want to logging: public class MyClass implements Component, Configurable, Reconfigurable, Initializable, Startable, Loggable{ public MyClass{} public void configure(Configuration conf) { //use conf here } public void reconfigure(Configuration conf) { //use conf here } public void initialize() { //initialization code } public void start() { //start code } public void stop() { //stop code } public void getLogger(Logger logger) { //get logger here } } And so on. Avalon is the glue that ties all together. If you implement Composable, you get a ComponentManager that gives you other Avalon components managed in the same way. There are Avalon components for URI resolving, caching, storage, xslt, etc. All these components are accessed by an interface, so you can out any concrete impl behind. In fact, Composable has: public Component lookup(String role); Whatever you get must be cast to an interface. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) -
Re: FOP Interfaces
I would *love* to be able to be able to get the page number where some event append (for example by stating fox:page-number/ in .fo source) cause it would greatly improve fop/itext interfacing. I personnaly use fop to render most of my content but i finish the work using itext (to watermark content, reorganize pages to produce booklets, insert some annexes written in pdf .. etc) Thanks a lot, whether you implement that or not! Fred. --- Joerg Pietschmann [EMAIL PROTECTED] a écrit : Jeremias Maerki [EMAIL PROTECTED] wrote: Output from FOP: - Generation statistics: Number of pages total What about: total=((Integer)processor.getAttribute(fop.totalNumberOfPages)).intValue() (Returns 0 before rendering, i suppose. Or is throwing an exception better?) Number of pages of each page-sequence Uh, perhaps pgsq2=((Integer)((Vector)processor.getAttribute(fop.pagesInSequence)).get(2)).intValue() or (less recommended but may get more resonance) pgsq2=((Integer)processor.getAttribute(fop.pagesInSequence.2)).intValue() (note the small differences) page-master used for each page (could be used to control the paper bin to get paper from, important for me in conjunction with PS Renderer). During rendering or after the rendering is complete? Regards J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
EBCDIC os390
I'll apologize upfront as I think my question is really for the users list but, I was unable to find how to subscribe to it. I'm developing under Websphere 4.0 and have had success in using FOP .20 on my NT machines. I take that ear file and install it on our os390 Websphere server and I get back garbage. If I convert the garbage from EBCDIC to ASCII with a tool, it appears the uncompressed streams convert fine. The document still does not work. How can I make FOP ensure that all of it's temporary streams use the proper encoding? The following snippet is how I'm using FOP. ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(application/pdf); Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); driver.render( foDoc ); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); TIA, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: [REDESIGN] TextLayoutManager whitespace handling
Hi Kerion, I agree it's better to have some output. Like my choir director says, we can't know if you're singing the wrong note if we can't hear it :-) I had some code written for this, but it's set up to return a BreakPosition and it's incomplete. I haven't gone back to the white-space handling code in a couple of months, but I remember that after I had written it, I went through some soul-searching about what should be done about text runs across fo:inline, wrappers etc. I actually wrote to the xsl-editors about this. quote date=26nov2001 1a. white-space-treatement: the values which ignore whitespace before, after or surrounding a linefeed, use the phrase any character flow object ... whose character is classified ... as white space in XML (or any sequence of such character flow objects) that immediately precedes/follows a character flow object whose Unicode code point ... is U+000A. By immediately preceding (or following) is it your intention that the sequence of character FOs in question are siblings, or that they are adjacent in a traversal of character FO leaves? In the first (literal) interpretation, in the following example the spaces after abc will not be ignored, because the following linefeed is in the wrapper and not an immediate sibling. fo:blockText abc abc fo:wrapper font-weight=bold xxx /fo:wrapper../fo:block 1b. white-space-collapse: same question for the true value concerning collapse of immediately preceding/following or consecutive. The literal interpretation is certainly easier to implement. If I use the leaf-node interpretation (ie, what is visible on the paper), there are some fuzzy cases where the value of the property can change in the middle of a sequence of white-space, which makes it hard to know what shold be done. On the other hand, in the case of fo:wrapper which is often used simply to change the font-style or weight, it seems logical that white-space handling should transparently cross the boundary. /quote That's one thing. In your example, even supposing we are doing white-space collapse, the issue is which one gets thrown out. In 7.5.12 (white-space-collapse), the spec says: .. [if] the immediately preceding flow object is a character flow object with a character classified as white space in XML ... that flow object shall not generate an area. So if we think that the the space after text and the one before more are adjacent, which is strictly speaking not the case, I'd say the one before more disappears. If we aren't collapsing or we decide that the intervening newline makes them not adjacent, there are two spaces and the second is underlined. -Karen Keiron Liddle wrote: Hi Karen, I seem to be having a bit of trouble getting that text parsing right. I was mainly just trying to get something to work to see on the output. It should be able to be simplified thanks to the earlöier whitespace handling. I still wonder what should be done in a situation like: blocksome text inline text-decoration=underline more textinlineblock Is the space before more underlined or not? Keiron. On 2002.02.23 18:30 [EMAIL PROTECTED] wrote: Keiron, I see you've actually started to make TextLayoutManager do something. I noticed during my CTM testing with the PDF renderer, that it's eating the first character of my text, ie. Hello world came out as ello world. Since I don't think you're French which could account for not pronouncing the 'h', I thought it might be due to the 'wordStart + 1' used to set the text for the Word Area. I also noticed there's a lot of whitespace handling in the code still. A few months ago I put some white-space handling into the FO tree building logic. In fo.flow.Block.end(), it basically iterates over all its kids and tries to get rid of all the unnecessary white-space before it gets to the layout manager. The idea was that the LM would only see the whitespace it was actually supposed to layout and the linefeeds which were real line-break characters. I haven't studied the new TextLM code in detail, but I would think it could be simplified based on that approach. Regards, Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
textalign
hallo, is there any possibility to write text from the bottom to the top, so the textstart at the bottom of a block-container and not from the top. thanks. thomas
RE: [REDESIGN] TextLayoutManager whitespace handling
Comments below. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Karen Lease Sent: February 28, 2002 6:31 PM To: [EMAIL PROTECTED] Subject: Re: [REDESIGN] TextLayoutManager whitespace handling [ SNIP ] That's one thing. In your example, even supposing we are doing white-space collapse, the issue is which one gets thrown out. In 7.5.12 (white-space-collapse), the spec says: .. [if] the immediately preceding flow object is a character flow object with a character classified as white space in XML ... that flow object shall not generate an area. So if we think that the the space after text and the one before more are adjacent, which is strictly speaking not the case, I'd say the one before more disappears. If we aren't collapsing or we decide that the intervening newline makes them not adjacent, there are two spaces and the second is underlined. -Karen Keiron Liddle wrote: Hi Karen, I seem to be having a bit of trouble getting that text parsing right. I was mainly just trying to get something to work to see on the output. It should be able to be simplified thanks to the earlöier whitespace handling. I still wonder what should be done in a situation like: blocksome text inline text-decoration=underline more textinlineblock Is the space before more underlined or not? Pursuant to my earlier post on this question, I think we are all agreed that score-spaces dictates whether or not the space immediately preceding the word more in the example gets underlined or not, _assuming_ that that space survives. As Karen points out, initial value for white-space-collapse will make the second space go away (leastways I concur in that interpretation). Adjacency is based on whether or not the 2 areas have a block- or inline-stacking-constraint, and the two spaces in question have an inline-stacking-constraint by 3a in Inline Stacking Constraints, Section 4.2.5, so are adjacent. Regards, AHS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: [REDESIGN] TextLayoutManager whitespace handling
I should add, if the 2 spaces end up on the same line, of course. Until we do layout we don't know. -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: February 28, 2002 7:03 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [REDESIGN] TextLayoutManager whitespace handling Comments below. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Karen Lease Sent: February 28, 2002 6:31 PM To: [EMAIL PROTECTED] Subject: Re: [REDESIGN] TextLayoutManager whitespace handling [ SNIP ] That's one thing. In your example, even supposing we are doing white-space collapse, the issue is which one gets thrown out. In 7.5.12 (white-space-collapse), the spec says: .. [if] the immediately preceding flow object is a character flow object with a character classified as white space in XML ... that flow object shall not generate an area. So if we think that the the space after text and the one before more are adjacent, which is strictly speaking not the case, I'd say the one before more disappears. If we aren't collapsing or we decide that the intervening newline makes them not adjacent, there are two spaces and the second is underlined. -Karen Keiron Liddle wrote: Hi Karen, I seem to be having a bit of trouble getting that text parsing right. I was mainly just trying to get something to work to see on the output. It should be able to be simplified thanks to the earlöier whitespace handling. I still wonder what should be done in a situation like: blocksome text inline text-decoration=underline more textinlineblock Is the space before more underlined or not? Pursuant to my earlier post on this question, I think we are all agreed that score-spaces dictates whether or not the space immediately preceding the word more in the example gets underlined or not, _assuming_ that that space survives. As Karen points out, initial value for white-space-collapse will make the second space go away (leastways I concur in that interpretation). Adjacency is based on whether or not the 2 areas have a block- or inline-stacking-constraint, and the two spaces in question have an inline-stacking-constraint by 3a in Inline Stacking Constraints, Section 4.2.5, so are adjacent. Regards, AHS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Corrupt PDF files?
I have a problem that is hard to debug. I am generating PDF files with FOP, and the process is working ok most of the time. Sometimes though, the file becomes corrupt (I'm sending the PDF back to a web browser based on a request a user makes from a JSP). Here's what we just found: we're using an external barcode font (a Code39 font). If we take the font out and don't use it in the PDF, it works fine everytime. Otherwise, it works sometimes. There's no discernible factor as to why it does/does not work, so I'm thinking there's something buggy in FOP. Has anyone had any kind of unpredictable behavior before with FOP when using external fonts? I'm using a TTF, I generated the metric file ok and everything, because the barcode does show up correctly SOMETIMES. Any help is greatly appreciated. Bobby Lewis Solutions Architect Aivia 3100 McKinnon Suite 1000 Dallas, TX 75201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/docs/xml-docs/fop relnotes.xml readme.xml resources.xml running.xml
chrisg 02/02/28 16:02:42 Modified:docs/xml-docs fop.xml docs/xml-docs/fop readme.xml resources.xml running.xml Added: docs/xml-docs/fop relnotes.xml Log: added release notes for 0.20.3 Revision ChangesPath 1.12 +2 -0 xml-fop/docs/xml-docs/fop.xml Index: fop.xml === RCS file: /home/cvs/xml-fop/docs/xml-docs/fop.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- fop.xml 14 Dec 2001 07:38:28 - 1.11 +++ fop.xml 1 Mar 2002 00:02:42 - 1.12 @@ -22,6 +22,8 @@ page id=compiling label=Compiling source=fop/compiling.xml/ page id=testinglabel=Testing source=fop/testing.xml/ separator/ + page id=relnotes label=Release Notes source=fop/relnotes.xml/ + separator/ faqs id=faqlabel=FAQ source=fop/faq.xml/ page id=bugs label=Bugs source=fop/bugs.xml/ page id=resources label=Resources source=fop/resources.xml/ 1.18 +1 -1 xml-fop/docs/xml-docs/fop/readme.xml Index: readme.xml === RCS file: /home/cvs/xml-fop/docs/xml-docs/fop/readme.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- readme.xml5 Feb 2002 19:14:58 - 1.17 +++ readme.xml1 Mar 2002 00:02:42 - 1.18 @@ -26,7 +26,7 @@ p figure width=480 height=260 src=document.jpg alt=Render Diagram / /p -pThe latest version of Fop is 0.20.3 and it supports the xsl:fo +pThe latest version of Fop is 0.20.3 and it supports the jump href=http://www.w3.org/TR/2001/REC-xsl-20011015/;XSL-FO Version 1.0 W3C Recommendation/jump. You can jump href=download.htmldownload/jump 1.9 +1 -0 xml-fop/docs/xml-docs/fop/resources.xml Index: resources.xml === RCS file: /home/cvs/xml-fop/docs/xml-docs/fop/resources.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- resources.xml 5 Feb 2002 19:14:58 - 1.8 +++ resources.xml 1 Mar 2002 00:02:42 - 1.9 @@ -33,6 +33,7 @@ lijump href=http://www.sun.com/software/xml/developers/slides-dtd/;Paul Sandoz: Using formatting objects with the slides dtd/jump/li lijump href=http://www.xml.com/pub/a/2001/01/17/xsl-fo/index.html;J. David Eisenberg: Using XSL Formatting Objects/jump/li lijump href=http://zvon.org/xxl/xslfoReference/Output/index.html;Miloslav Nic: XSL FO reference/jump/li + lijump href=http://www.dpawson.co.uk/xsl/sect3/bk/index.html;Dave Pawson: An introduction to XSL Formatting Objects/jump/li /ul /s2 s2 title=Other resources 1.18 +1 -3 xml-fop/docs/xml-docs/fop/running.xml Index: running.xml === RCS file: /home/cvs/xml-fop/docs/xml-docs/fop/running.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- running.xml 5 Feb 2002 19:14:58 - 1.17 +++ running.xml 1 Mar 2002 00:02:42 - 1.18 @@ -15,11 +15,9 @@ jump href=http://xml.apache.org/xerces-j/index.html;Xerces-J/jump. (Xerces is the default xml parser) /li -liAn XSLT processor +liAn XSLT processor (Xalan is included) /li liThe SVG library batik.jar is the library from the jump href=http://xml.apache.org/batik/;batik project/jump at xml.apache.org. -/li -liThe imaging library Jimi from Sun /li /ul /p 1.1 xml-fop/docs/xml-docs/fop/relnotes.xml Index: relnotes.xml === ?xml version=1.0 standalone=no? !-- Overview -- document header titleRelease Notes/title subtitleFop 0.20.3/subtitle authors /authors /header body s1 title=FOP 0.20.3 pImportant Information: ul liThis version supports the jump href=http://www.w3.org/TR/2001/REC-xsl-20011015/;XSL-FO Version 1.0 W3C Recommendation/jump syntax. So don't forget to update your Stylesheets: pJust rename the codemaster-name/code property to codemaster-reference/code on codefo:page-sequence/code, codefo:single-page-master-reference/code, codefo:repeatable-page-master-reference/code and codefo:conditional-page-master-reference/code./p/li liJDK 1.2 (or better) is required/li liJimi has been removed for licensing
RE: C# version of FOP
Hi, Steve Speaking as an individual committer I think it's excellent that you've done this. I happen to be completely language-agnostic and I'll use anything that works, including everything in the MS stable. I would recommend that you start a Sourceforge project to take this further. Once you've got that done, and code uploaded, interested parties will appear, and I'm sure you'll attract people. I'd be interested in taking a look myself. Regards, Arved Sandstrom -Original Message- From: Sarandos Steve [mailto:[EMAIL PROTECTED]] Sent: February 28, 2002 9:46 AM To: '[EMAIL PROTECTED]' Subject: C# version of FOP I have been working on converting FOP to C# for a project I'm working on. I currently have a C# version producing EMF page images from the example FOP files from 0.20.3rc. I'm producing EMF right now since that is the specific format my application requires. To ease my conversion effort I backed out the SVG code (so I wouldn't have to convert Batik yet) and I removed the PDFRenderer (since I'm not interested in PDF currently). I focused on converting the AWTRenderer to produce EMF page images. I don't think it will be that much work to add the PDFRenderer back in later -- minus SVG of course. I wanted to find out if any of you are interested in a C# version of FOP or, if not, then if you could direct me to a group that might be. I would like to get an a open source group started on developing this version further. - 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: Options
Jeremias, Jeremias Maerki wrote: Hi Peter ... You'll have to create a GUI or use OS X. :-) Well, that leads me to the question: What are you actually trying to do? We're talking about solutions here, but not what you need them for (I think). There's a very useful discussion going on about logging, Avalon, etc, which covers this territory in more general terms. Anything that rationalises and makes consistent and readily understandable the invovation and setup of FOP will be a very good thing. I'm just talking about the very limited aim of unifying and making more useful the existing maintenance branch options/configuration code. ... I don't get you here. What do you need the language validation for? For completeness. I can specify country, language and script, and these may be acted upon in respect of hyphenation. Two situations may arise. 1) That particular language/country/script may have no support in this version of FOP. 2) There is no such language/country/script. When I'm parsing one of these attributes, I like to be able to detect the second situation at the point of parsing. I'm lost. Sorry, but I really can't follow you. My fault. In the middle of this discussion about options processing, I came across the references to the language file in the config file, so I dragged them in, kicking and screaming. I can specify country.language and script... should read, The user can specify country, language and script... as properties in the FO file that I'm processing. See 7.9.2 language, 7.9.1 country, and 7.9.3 script in the Recommendation. When I was looking at the parsing of such properties, I wanted to be able to validate the element attributes immediately after they were parsed by the expression parser. I either had to hard-code the lists, or provide for a way of updating them outside the code, so I went for a configuration file, pointed to by the the general config file. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Example extension
Hi fop-dev, Has anyone written a simple(ish) FOP extension that they would be willing to share with the list (or even just me) as an example? I'm talking full jar file here. The lack of examples (other than the quite complicated SVG extension) in the docs and on the mailing lists is quite frustrating. We don't have to go through the work of writing it up for publication (yet). Just seeing the mechanics of someone else's jar would be great for beginners. Thanks in advance. Regards, Adrian Edwards Application Developer Netimpact Online Publishing http://www.netimpact.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Exception
Seems like we have two people almost at the same time having problems with NPEs in loadImage() methods. Ivaylo, it looks like you're not using the latest version of FOP, so I haven't been able to find out what exactly caused the NPE. It's not that it will necessarily work if you update! I've looked at the code and I think it's this.m_bitmaps is null for some reason that I haven't figured out, yet. It's the same in GifJpegImage.java as in BmpImage.java (David's problem). I believe it's a threading problem. There's a method close() in AbstractFopImage.java Factory that sets m_images to null. FopImageFactory caches bitmaps, so my guess is that an image can get closed while the same object is accessed from a different thread (method loadImage()). I must confess that I don't have time to look at it at the moment. Any takers? As a work-around, you could try to block your servlet so only one thread at a time can use FOP to process your jobs. Not nice, but you could be forced to do that for the time being. I create PDFs in 10 parallel threads and every now and then I have this Exception. Can someone clarify for me what is the problem and how to fix it? I suspect it is related with parallel usage of same gif image. snip/ java.lang.NullPointerException at org.apache.fop.image.GifJpegImage.loadImage(GifJpegImage.java:131) Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Example extension
Thanks for that very interesting link Michiel. But I couldn't find any information on extending fop there, just extending XSLT. Of course, I may have missed it... I have no trouble with including elements from a custom namespace in an XSL-FO document, it's just the Java code to get FOP to handle my extension elements that I cannot find any good examples for. Once again, I appreciate your attempt at help. Anyone else? - Adrian -Original Message- From: Michiel Verhoef [mailto:[EMAIL PROTECTED]] Sent: Friday, 1 March 2002 6:36 PM To: '[EMAIL PROTECTED]' Subject: RE: Example extension Have a look at: http://www.exslt.org/ HTH, Michiel $ -Original Message- $ From: Adrian Edwards [mailto:[EMAIL PROTECTED]] $ Sent: vrijdag 1 maart 2002 8:34 $ To: [EMAIL PROTECTED] $ Subject: Example extension $ $ $ Hi fop-dev, $ $ Has anyone written a simple(ish) FOP extension that they would be $ willing to share with the list (or even just me) as an example? I'm $ talking full jar file here. The lack of examples (other than $ the quite $ complicated SVG extension) in the docs and on the mailing $ lists is quite $ frustrating. $ $ We don't have to go through the work of writing it up for publication $ (yet). Just seeing the mechanics of someone else's jar would be great $ for beginners. $ $ Thanks in advance. $ $ Regards, $ $ Adrian Edwards $ Application Developer $ Netimpact Online Publishing $ http://www.netimpact.com.au $ $ $ - $ 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]
Re: FOP Interfaces
Output from FOP: - Generation statistics: Number of pages total What about: total=((Integer)processor.getAttribute(fop.totalNumberOfPages)).intValue() (Returns 0 before rendering, i suppose. Or is throwing an exception better?) Number of pages of each page-sequence Uh, perhaps pgsq2=((Integer)((Vector)processor.getAttribute(fop.pagesInSequence)).get(2)).intValue() or (less recommended but may get more resonance) pgsq2=((Integer)processor.getAttribute(fop.pagesInSequence.2)).intValue() (note the small differences) Hierarchical data in Maps. Eeeek! (Sorry!) For these two I've already added a couple of classes you can get that information from. I've added this just for completeness. Have a look at org.apache.fop.apps.FormattingResults and the Driver.getResults() method. My original post can be found here: http://marc.theaimsgroup.com/?l=fop-devm=100747811203665w=2 page-master used for each page (could be used to control the paper bin to get paper from, important for me in conjunction with PS Renderer). During rendering or after the rendering is complete? Both. The PSRenderer could use it during rendering so it can set the respective paper bins. Currently, I'd need it more after rendering is complete because I currently generate PDFs that get converted to PostScript later on and I patch those files afterwards to apply paper bin selection (and other stuff). Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: EBCDIC os390
I'll apologize upfront as I think my question is really for the users list but, I was unable to find how to subscribe to it. No, I think you're in the right place. I'm developing under Websphere 4.0 and have had success in using FOP .20 on my NT machines. I take that ear file and install it on our os390 Websphere server and I get back garbage. If I convert the garbage from EBCDIC to ASCII with a tool, it appears the uncompressed streams convert fine. The document still does not work. How can I make FOP ensure that all of it's temporary streams use the proper encoding? The following snippet is how I'm using FOP. Ben Fowler posted a similar mail two days ago. http://marc.theaimsgroup.com/?l=fop-devm=101480100804070w=2 You're in the same boat. I think it would be good if you one of you two could really track down the problem, create a patch for it and post it to the list for inclusion into FOP along with some documentation (guidelines) what has to be done to ensure non-ascii-environment compatibility in FOP for the future. Cheers Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]