DO NOT REPLY [Bug 46486] page-position=last causes blocks with span=all to disappear

2009-04-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46486





--- Comment #7 from Vincent Hennebert vhenneb...@gmail.com  2009-04-01 
03:30:29 PST ---
Hi Andreas,

I'd suggest you not to worry about changes in the number of columns, otherwise
you will indeed bump into the very problems that I am trying to solve at the
moment. It's a known limitation that FOP can't handle pages of different widths
at the moment, and changes in the number of columns are basically that:
different line widths.

Your idea of deferring the calls to addAreas looks promising to me, I think you
should pursue in that direction and that may be enough for now. Also, in the
sample file the dimensions of the region-body for the last page (PageBack) are
the same as for the other pages (PageFront). I've seen a lot of documents for
which that was the case, and the only difference was in the static-contents for
the page header/footer. It may be worthwhile to check the dimensions of the
last page, and if they are the same there's no need to re-do page breaking at
all. Or even, if the bpd of the last page is smaller than on other pages but
big enough to receive the content for the last part, then no need to re-do page
breaking either. That would also solve the column-balancing problem.

HTH,
Vincent


(In reply to comment #6)
 For documentation purposes:
 Spent quite some time trying to get it working correctly, by deferring the 
 part
 after the last page-break in case we have a last page-master and more content
 is to follow, but then realized that that approach is suffering the same
 deficiency as the implementation as a whole. 
 By only working with the prepared block-lists/line-boxes, only the page-breaks
 not the line-breaks are recomputed.
 
 Checked and verified my suspicion that alternating page-masters with different
 column-count don't work either, so this is part of a deeper problem.
 
 My further thoughts can only go in the direction of something similar to
 interleaved line- and page-breaking, so a solution for this issue:
 a) would solve a lot of other ones as well, but
 b) could cause significant overlap with Vincent's long-term objective
 
 A bit more concrete:
 LineLayoutManager should be refactored, and line-breaking should probably
 modeled along the same lines as page-breaking. See
 AbstractBreaker-PageBreaker. Makes you wonder why we don't have a LineBreaker
 (yet)? I get the feeling that such refactoring may make it much easier to
 restart the line-breaking, using a different reference-ipd. I'm not even sure
 we really need a LineLayoutManager to begin with. There is, strictly speaking,
 no PageLayoutManager either...
 This may cause some other relocations, as I have the distinct impression that
 AbstractBreaker is far from 'abstract'. There's too much code in there that
 seems quite specific to page- (or block-level) breaking. An 
 AbstractPageBreaker
 as a common superclass for BlockContainerBreaker, StaticContentBreaker...?
 If we:
 a) introduce a LineBreaker, 
 b) expose its 'doLayout()' method, 
 c) make sure it is associated with the line-boxes
 
 then it should be possible to restart the LineBreaker, during the 
 page-breaking
 loop without having to pass via the FlowLayoutManager again.
 
 One suboptimal issue then remains: FlowLayoutManager.getNextKnuthElements()
 will not return until a span-change or forced break is signaled. That could
 mean we compute line-breaks for 40 pages of content, where maybe the second
 page is already different, and 39 pages have to be redone...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


Trunk - java.lang.ArrayIndexOutOfBoundsException: 273

2009-04-01 Thread bonekrusher

Hi, see below the error I am getting in Trunk. I am not getting this in .95.

I've attached the FO.
http://www.nabble.com/file/p22825563/test-out.fo test-out.fo 

fop -fo C:\sandbox\saxonb9-1-0-5j\test-out.fo -pdf out.pdf  

Apr 1, 2009 8:35:07 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.ArrayIndexOutOfBoundsException: 273
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:239)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:128)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)

-

java.lang.ArrayIndexOutOfBoundsException: 273
at
org.apache.fop.fo.StaticPropertyList.get(StaticPropertyList.java:70)
at org.apache.fop.fo.PropertyList.get(PropertyList.java:155)
at org.apache.fop.fo.flow.Block.bind(Block.java:133)
at org.apache.fop.fo.FObj.processNode(FObj.java:123)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuil
der.java:282)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Tra
nsformerIdentityImpl.java:1072)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Sour
ce)
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown
Sourc
e)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Sour
ce)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:128)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)

-- 
View this message in context: 
http://www.nabble.com/Trunk---java.lang.ArrayIndexOutOfBoundsException%3A-273-tp22825563p22825563.html
Sent from the FOP - Dev mailing list archive at Nabble.com.



Re: Trunk - java.lang.ArrayIndexOutOfBoundsException: 273

2009-04-01 Thread Andreas Delmelle

On 01 Apr 2009, at 14:40, bonekrusher wrote:

Hi Phil



Hi, see below the error I am getting in Trunk. I am not getting this  
in .95.


I've attached the FO.
http://www.nabble.com/file/p22825563/test-out.fo test-out.fo


fop -fo C:\sandbox\saxonb9-1-0-5j\test-out.fo -pdf out.pdf


snip /
java.lang.ArrayIndexOutOfBoundsException: 273
   at
org.apache.fop.fo.StaticPropertyList.get(StaticPropertyList.java:70)


This issue recently also popped up on fop-us...@. Normally, it should  
be enough to run 'ant clean' to resolve it.



HTH!

Andreas


Re: Trunk - java.lang.ArrayIndexOutOfBoundsException: 273

2009-04-01 Thread bonekrusher

Thanks... did the trick


Andreas Delmelle-2 wrote:
 
 On 01 Apr 2009, at 14:40, bonekrusher wrote:
 
 Hi Phil
 

 Hi, see below the error I am getting in Trunk. I am not getting this  
 in .95.

 I've attached the FO.
 http://www.nabble.com/file/p22825563/test-out.fo test-out.fo

 fop -fo C:\sandbox\saxonb9-1-0-5j\test-out.fo -pdf out.pdf

 snip /
 java.lang.ArrayIndexOutOfBoundsException: 273
at
 org.apache.fop.fo.StaticPropertyList.get(StaticPropertyList.java:70)
 
 This issue recently also popped up on fop-us...@. Normally, it should  
 be enough to run 'ant clean' to resolve it.
 
 
 HTH!
 
 Andreas
 
 

-- 
View this message in context: 
http://www.nabble.com/Trunk---java.lang.ArrayIndexOutOfBoundsException%3A-273-tp22825563p22831023.html
Sent from the FOP - Dev mailing list archive at Nabble.com.