Re: list-item formatting in 0.92
Thanks, Jeremias! --- Jeremias Maerki [EMAIL PROTECTED] wrote: David, the reason for the problem is a vertical overflow in the static-content. Log output: WARNING: static-content overflows the available area. (fo:static-content, Header1, Header2) It's always a good idea to look at warnings on the log even if they may seem unrelated. You can also see now why just posting a snippet is sometimes not enough. Always post complete examples because the actual problem could lie elsewhere. So, if you increase the extent for region-before, the problem vanishes. There's no real bug. It could be said however, that some of the code in StaticContentLayoutManager and ListItemLayoutManager could probably be improved a little to avoid these somewhat strange results. Some technical background for those interested as to why the problem manifested itself as it did: Since the content in static-content overflows, it is broken into two parts by the breaker (same code as for page breaking). The StaticContentLayoutManager renders the second part right under the first. Since the breakpoint is between the block 1 and block 2 in the item-body, the block 2 is rendered as part of the second part. It could be said that the StaticContent should probably not render the generated parts but rather the whole sequence in case of an overflow. Furthermore, we could try to find out why the ListItemLayoutManager did not combine block 1 and block2 as the element list from the label should not allow breaking these two apart (because of the image's height). On 08.06.2006 20:17:48 David P. Nesbitt wrote: Jeremias, I think the three enclosed files demonstrate what I am seeing. Please place them in the same directory and run the following command: fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf You will see the behavior that I described earlier (I hope). Namely: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Interestingly, if you change the change-me variable from '1.56in' to '1.57in', I think you will see the following behavior: - |item-body (block 1)| - - |item-label| |item-body (block 2)| - Is that what you would expect? I would expect the following: - |item-label| |item-body (block 1)| - - |item-body (block 2)| - Is there a way to get my expected behavior? Thanks again for your assistance. Regards, Dave --- Jeremias Maerki [EMAIL PROTECTED] wrote: It could, yes, especially since I can't reproduce it. Maybe if you have a full, scaled-down FO file that demonstrates it. Maybe your snippet is just not enough to demonstrate what's going on. On 06.06.2006 18:15:26 David P. Nesbitt wrote: Jeremias, Thanks for the assistance. Would it help if I provided the generated PDF? Regards, Dave --- Jeremias Maerki [EMAIL PROTECTED] wrote: Hmm, I don't see the effect you describe. The snippet renders as I would expect. On 06.06.2006 04:38:52 David P. Nesbitt wrote: The formatting of list-item has seemed to have changed from 0.20.5 to 0.92. I have a list item (code contained below) that is rending as follows in 0.92: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Here is what I am expecting and how 0.20.5 seemed to work (unless something else in the port is causing this changed behavior): - |item-label| |item-body (block 1)| - - |item-body (block 2)| - How can I get my desired behavior in 0.92? snip/ Jeremias Maerki Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: list-item formatting in 0.92
Jeremias, I think the three enclosed files demonstrate what I am seeing. Please place them in the same directory and run the following command: fop -xml Test.xml -xsl Test.xsl -pdf Test.pdf You will see the behavior that I described earlier (I hope). Namely: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Interestingly, if you change the change-me variable from '1.56in' to '1.57in', I think you will see the following behavior: - |item-body (block 1)| - - |item-label| |item-body (block 2)| - Is that what you would expect? I would expect the following: - |item-label| |item-body (block 1)| - - |item-body (block 2)| - Is there a way to get my expected behavior? Thanks again for your assistance. Regards, Dave --- Jeremias Maerki [EMAIL PROTECTED] wrote: It could, yes, especially since I can't reproduce it. Maybe if you have a full, scaled-down FO file that demonstrates it. Maybe your snippet is just not enough to demonstrate what's going on. On 06.06.2006 18:15:26 David P. Nesbitt wrote: Jeremias, Thanks for the assistance. Would it help if I provided the generated PDF? Regards, Dave --- Jeremias Maerki [EMAIL PROTECTED] wrote: Hmm, I don't see the effect you describe. The snippet renders as I would expect. On 06.06.2006 04:38:52 David P. Nesbitt wrote: The formatting of list-item has seemed to have changed from 0.20.5 to 0.92. I have a list item (code contained below) that is rending as follows in 0.92: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Here is what I am expecting and how 0.20.5 seemed to work (unless something else in the port is causing this changed behavior): - |item-label| |item-body (block 1)| - - |item-body (block 2)| - How can I get my desired behavior in 0.92? snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ?xml version=1.0 encoding=UTF-8? Test xmlns=http://www.yahoo.com/david_p_nesbitt/?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:test=http://www.yahoo.com/david_p_nesbitt; exclude-result-prefixes=test xsl:variable name=change-me select='1.56in'/ xsl:variable name=ph1 select='Header1'/ xsl:variable name=ph2 select='Header2'/ xsl:template name=page-template fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-right=0.5in margin-left=0.5in margin-bottom=0.5in margin-top=0.5in master-name=all page-height=11in page-width=8.5in fo:region-body margin-top= margin-bottom=0.5in region-name=xsl-region-body xsl:attribute name=margin-topxsl:value-of select=$change-me//xsl:attribute /fo:region-body fo:region-before region-name=header xsl:attribute name=extentxsl:value-of select=$change-me//xsl:attribute /fo:region-before fo:region-after extent=0.5in region-name=footer/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=all fo:static-content flow-name=header fo:list-block fo:list-item fo:list-item-label fo:block fo:block text-align=left padding-before=0.15in fo:external-graphic src=Test.gif content-height=0.75in content-width=3.0in/ /fo:block fo:block/ /fo:block /fo:list-item-label fo:list-item-body fo:block fo:block text-align=right padding-before=0.15in font-size=14pt font-weight=bold color=#C0 vertical-align=middleBlock 1/fo:block fo:block text-align=right padding-before=0.0675in font-size=9pt font-weight=bold color=gray vertical-align=topBlock 2/fo:block /fo:block /fo:list-item-body /fo:list-item
Re: list-item formatting in 0.92
Jeremias, Thanks for the assistance. Would it help if I provided the generated PDF? Regards, Dave --- Jeremias Maerki [EMAIL PROTECTED] wrote: Hmm, I don't see the effect you describe. The snippet renders as I would expect. On 06.06.2006 04:38:52 David P. Nesbitt wrote: The formatting of list-item has seemed to have changed from 0.20.5 to 0.92. I have a list item (code contained below) that is rending as follows in 0.92: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Here is what I am expecting and how 0.20.5 seemed to work (unless something else in the port is causing this changed behavior): - |item-label| |item-body (block 1)| - - |item-body (block 2)| - How can I get my desired behavior in 0.92? Regards, Dave fo:list-block fo:list-item fo:list-item-label fo:block text-align=left padding-before=0.15in width=3.50in fo:external-graphic src=intelligent_systems_logo.gif content-height=0.75in content-width=3.0in / /fo:block /fo:list-item-label fo:list-item-body fo:block fo:block text-align=right padding-before=0.15in font-size=14pt font-weight=bold color=#C0 vertical-align=middleCurrent Out Of Stock Report/fo:block fo:block text-align=right padding-before=0.0675in font-size=9pt font-weight=bold color=gray vertical-align=topJune 05, 2006 at 01:16 PM/fo:block /fo:block /fo:list-item-body /fo:list-item /fo:list-block Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
list-item formatting in 0.92
The formatting of list-item has seemed to have changed from 0.20.5 to 0.92. I have a list item (code contained below) that is rending as follows in 0.92: - |item-body (block 1)| - |item-label| - |item-body (block 2)| - Here is what I am expecting and how 0.20.5 seemed to work (unless something else in the port is causing this changed behavior): - |item-label| |item-body (block 1)| - - |item-body (block 2)| - How can I get my desired behavior in 0.92? Regards, Dave fo:list-block fo:list-item fo:list-item-label fo:block text-align=left padding-before=0.15in width=3.50in fo:external-graphic src=intelligent_systems_logo.gif content-height=0.75in content-width=3.0in / /fo:block /fo:list-item-label fo:list-item-body fo:block fo:block text-align=right padding-before=0.15in font-size=14pt font-weight=bold color=#C0 vertical-align=middleCurrent Out Of Stock Report/fo:block fo:block text-align=right padding-before=0.0675in font-size=9pt font-weight=bold color=gray vertical-align=topJune 05, 2006 at 01:16 PM/fo:block /fo:block /fo:list-item-body /fo:list-item /fo:list-block __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What happened to base dir in 0.92?
Andreas, Thanks for the response. However, I am running in embedded mode, so I don't think the UserAgent thing is relevant. Is it? Also, since I want to obtain the resources from the war file, I can't have a static setting in the config file. It needs to be determined at run time. Anyone know how to do this for embedded mode? Regards, Dave --- Andreas L Delmelle [EMAIL PROTECTED] wrote: On Jun 3, 2006, at 03:33, David P. Nesbitt wrote: Hi David, snip / With 0.92, there doesn't seem to be a mechanism for initializing the baseDir anymore. Yes there is, only not directly through a factory method. IIC, then what you're after is either: - the baseURL entry in the config file - the setBaseURL() method of FOUserAgent HTH! Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What happened to base dir in 0.92?
Thanks again, Andreas! I will try that out on Monday and let you know how it turns out. As always, I sincerely appreciate the help! Regards, Dave --- Andreas L Delmelle [EMAIL PROTECTED] wrote: On Jun 3, 2006, at 19:13, David P. Nesbitt wrote: Andreas, Thanks for the response. However, I am running in embedded mode, so I don't think the UserAgent thing is relevant. Is it? It sure is. Even if you don't instantiate one explicitly, FopFactory uses a default FOUserAgent internally. Also, since I want to obtain the resources from the war file, I can't have a static setting in the config file. It needs to be determined at run time. That's were the FOUserAgent steps in. Instead of relying on the default one provided by FopFactory, you'd instantiate one yourself, and feed that back into the newFop() factory method. see: http://xmlgraphics.apache.org/fop/0.92/embedding.html#config- internal mainly the last part about 'Customizing the User Agent' HTH! Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What happened to base dir in 0.92?
We store our images and font metrics files in a resource directory in our war file. Using the following code in 0.20.5, we could access these images and font metrics from within the war file. org.apache.fop.configuration.Configuration.put( baseDir, AbstractDataRetriever.class.getResource(resource/).getFile()); org.apache.fop.configuration.Configuration.put( fontBaseDir, AbstractDataRetriever.class.getResource(resource/).getFile()); File userConfigFile = new File(AbstractDataRetriever.class.getResource( resource/userconfig.xml).getFile()); try { new org.apache.fop.apps.Options(userConfigFile); } catch (org.apache.fop.apps.FOPException fope) { LOG.error(FOP initialization failed!, fope); } With 0.92, there doesn't seem to be a mechanism for initializing the baseDir anymore. Our images are no longer showing up in the generated PDF files. Here is the 0.92 initialization code: try { FOP_FACTORY.setUserConfig( AbstractDataRetriever.class.getResource( resource/userconfig.xml).getFile()); FOP_FACTORY.setFontBaseURL( AbstractDataRetriever.class.getResource( resource/).getFile()); } catch (Throwable t) { LOG.error(FOP initialization failed!, t); } How can we configure FOP version 0.92 to find images in our war file? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP and threading
It is possible to have separate configurations of FOP running within the same JVM? I am using the following to configure FOP: new org.apache.fop.apps.Options(userConfigFile); But I would like to have more than one configuration used within the same application server. Regards, Dave __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LazyFont null pointer exception
Has anyone ever seen this exception? Once we get this exception, it seems we have to restart our application container (JBoss) to remedy the problem. The issue seems intermittent at this point. We get PDF files for a while with no problem and then for no particular reason we seem to get this exception. Any help is greatly appreciated. Regards, Dave at org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127) at org.apache.fop.layout.FontState.getAscender(FontState.java:143) at org.apache.fop.layout.LineArea.init(LineArea.java:326) at org.apache.fop.layout.BlockArea.getCurrentLineArea(BlockArea.java:164) at org.apache.fop.fo.FOText.addRealText(FOText.java:263) at org.apache.fop.fo.FOText.addText(FOText.java:252) at org.apache.fop.fo.FOText.layout(FOText.java:161) at org.apache.fop.fo.flow.Block.layout(Block.java:257) at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:326) at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360) at org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:236) at org.apache.fop.fo.flow.Table.layout(Table.java:282) at org.apache.fop.fo.flow.Block.layout(Block.java:257) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:309) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:435) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:273) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107) Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]