You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Laurent Balthasar <la...@brutele.be> on 2008/04/23 15:54:52 UTC
FOP 0.95beta: Problem with fo:block-container
absolute-position="absolute"
Hello,
We had to migrate from fop 0.94 to 0.95beta (because of jdk migration
1.4->1.6).
Now I'm facing a problem i haven't found any workaround.
In the pdf we use an xsl template to define a title and this title has a
background . This title template is used a bit everywhere (tables,
block,...)
this is the code that used to work in 0.94:
<fo:block text-align="center">
<fo:table width="102px" margin-left="0px" table-layout="fixed">
<fo:table-column column-width="102px"/>
<fo:table-body >
<fo:table-row block-progression-dimension.minimum="17px">
<fo:table-cell padding-top="3px" padding-bottom="0px"
margin-left="5px" margin-top="0px" margin-bottom="0px" margin-right="5px"
text-align="center">
<fo:block>
<fo:external-graphic width="90px" height="15px"
content-height="scale-to-fit" content-width="scale-to-fit"
src="violet_button.gif"/>
</fo:block>
<fo:block-container absolute-position="absolute" top="3px" left="0px">
<fo:block color="red" font-size="10pt" font-family="Verdana"
>Test</fo:block>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
The idea is to put an image in a table row and use an absolute position to
write text on it.
With fop 95beta, it seems the absolute position is taken from the page and
not from the containing bloc like fop 0.94 used to do.
I think 0.95 use wrong positionning, but i'm not sure.
Is it a bug from 0.94 or from 0.95?
PS: i uploaded an fo file that works well in 0.94 and 0.93 and not in 0.95
beta: http://www.nabble.com/file/p16834614/test-absolute.fo test-absolute.fo
and the gif image for the button:
http://www.nabble.com/file/p16834614/violet_button.gif violet_button.gif
--
View this message in context: http://www.nabble.com/FOP-0.95beta%3A-Problem-with-fo%3Ablock-container-absolute-position%3D%22absolute%22-tp16834614p16834614.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container absolute-position="absolute"
Posted by Andreas Delmelle <an...@telenet.be>.
On Apr 25, 2008, at 16:10, Laurent Balthasar wrote:
>
> Sorry i used wrong svn path... Now it's ok with
> http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
OK, that was another alternative. I did not commit my changes to the
release branch.
Anyway, FOP Trunk should now also be complete again after:
http://svn.apache.org/viewvc?rev=651613&view=rev
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container
absolute-position="absolute"
Posted by Laurent Balthasar <la...@brutele.be>.
Laurent Balthasar wrote:
>
> Ok, nice to have been able to contribute for debugging:)
> But... could it be possible to have a snapshot version of the jar? I
> downloaded from svn(http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk)
> and compile but i got 2 errors:
> C:\DevTools\fopTrunk\trunk\src\java\org\apache\fop\area\Area.java:379:
> cannot find symbol
> symbol : method getPropType()
> location: class org.apache.fop.area.Trait
> props.put(prop.getPropType(), prop.getData());
>
> I need the 0.95, because with 1.6 and 0.94, i have an error like
> java.lang.NoClassDefFoundError:
> org/apache/xml/utils/URI$MalformedURIException (see
> http://www.nabble.com/using-FOP-under-JRE-1.6-td13795978.html).
>
> Anyway, thanks for such quick responses and fixes!
>
>
Sorry i used wrong svn path... Now it's ok with
http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
--
View this message in context: http://www.nabble.com/FOP-0.95beta%3A-Problem-with-fo%3Ablock-container-absolute-position%3D%22absolute%22-tp16834614p16895776.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container absolute-position="absolute"
Posted by Andreas Delmelle <an...@telenet.be>.
On Apr 25, 2008, at 15:50, Laurent Balthasar wrote:
Hi Laurent (and others),
>
> Ok, nice to have been able to contribute for debugging:)
> But... could it be possible to have a snapshot version of the jar? I
> downloaded from svn(http://svn.apache.org/repos/asf/xmlgraphics/fop/
> trunk)
> and compile but i got 2 errors:
> C:\DevTools\fopTrunk\trunk\src\java\org\apache\fop\area\Area.java:379:
> cannot find symbol
Sorry, my bad. Seems like this is due to a commit I made earlier
today. Either I cut out too much, or forgot to commit a file...
I'm on it, and will let you know ASAP when this is fixed, so you can
download and build FOP trunk.
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container
absolute-position="absolute"
Posted by Laurent Balthasar <la...@brutele.be>.
Ok, nice to have been able to contribute for debugging:)
But... could it be possible to have a snapshot version of the jar? I
downloaded from svn(http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk)
and compile but i got 2 errors:
C:\DevTools\fopTrunk\trunk\src\java\org\apache\fop\area\Area.java:379:
cannot find symbol
symbol : method getPropType()
location: class org.apache.fop.area.Trait
props.put(prop.getPropType(), prop.getData());
I need the 0.95, because with 1.6 and 0.94, i have an error like
java.lang.NoClassDefFoundError:
org/apache/xml/utils/URI$MalformedURIException (see
http://www.nabble.com/using-FOP-under-JRE-1.6-td13795978.html).
Anyway, thanks for such quick responses and fixes!
--
View this message in context: http://www.nabble.com/FOP-0.95beta%3A-Problem-with-fo%3Ablock-container-absolute-position%3D%22absolute%22-tp16834614p16895763.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Pages cutting off
Posted by Lauren Riley <La...@FBLFinancial.com>.
I recently upgraded from 0.20.5 to .95. My pages are just suddenly cutting
off at page 7...and I can't figure out why.
I AM getting this error message
[4/24/08 15:31:20:281 CDT] 0000005a AbstractBreak W
org.apache.fop.layoutmgr.PageBreaker$1 notifyOverflow Content of the
region-body on page 7 overflows the available area in block-progression
dimension. (fo:page-sequence, location: 17/-1)
But the table is just getting cut off in the middle, so I'm not sure why.
It's getting cut off in the middle of the BusinessLiability template. But
I forced a page break right before that, and it did break, it had a page 8
with a complete BusinessLiability template...but then the
FarmRanchPersonalProperty template cut off in the middle. I'm confused!
Here's some code snippets
<xsl:template match="accountInfo">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<xsl:call-template name="setLandscapePageMargins"/>
</fo:layout-master-set>
<fo:page-sequence master-reference="all" format="1" force-page-count
="no-force">
<!-- header with running glossary entries -->
<fo:static-content flow-name="xsl-region-before">
<xsl:call-template name="PolicySection"/>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:if test="comment">
<xsl:call-template name="CommentSection"/>
</xsl:if>
<xsl:call-template name="InsuredSection"/>
<xsl:if test="umbrella/isAllFarmBureauCoverage">
<xsl:call-template name="UmbrellaSection"/>
</xsl:if>
<xsl:if test="prm or location">
<fo:block overflow="visible" break-before="page"/>
</xsl:if>
<xsl:if test="prm">
<xsl:call-template name="PropertyRatingModifiers"/>
</xsl:if>
<xsl:if test="location">
<xsl:call-template name="LocationsAndStructures"/>
</xsl:if>
<xsl:if test="businessLiability/businessType">
<xsl:call-template name="BusinessLiability"/>
</xsl:if>
<xsl:if test="frpp[indicator='LBF'] or frpp[indicator='LBP']">
<xsl:call-template name="Liability"/>
</xsl:if>
<xsl:if test="frppScheduledTotals or frppBlanketTotals">
<xsl:call-template name="FarmRanchPersonalProperty"/>
</xsl:if>
<xsl:if test="location/additionalInsured">
<xsl:call-template name="AdditionalInsureds"/>
</xsl:if>
<xsl:if test="spp">
<xsl:call-template name="ScheduledPersonalProperty"/>
</xsl:if>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template name="setLandscapePageMargins">
<fo:simple-page-master master-name="all"
page-height="21cm" page-width="27.9cm"
margin-top=".1cm" margin-bottom=".1cm"
margin-left=".1cm" margin-right=".1cm">
<fo:region-body margin-top="3cm" margin-bottom=".1cm"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1cm"/>
</fo:simple-page-master>
</xsl:template>
<xsl:template name="BusinessLiability">
<fo:block overflow="visible" text-align="start" space-before="10pt"
font-size="12pt" font-family="Helvetica" line-height="1em
+6pt" font-weight="bold"
background-color="gray"
keep-with-next.within-page="always"
border-top="solid thin black">
Business Liability:
</fo:block>
<fo:block overflow="visible">
<fo:table table-layout="fixed" space-before="10pt" font-family="Helvetica
" font-size="9pt" border-collapse="separate" width="100%">
<fo:table-column column-width="6cm"/>
<fo:table-column column-width="5.5cm"/>
<fo:table-column column-width="5.5cm"/>
<fo:table-header>
<fo:table-row keep-with-next.within-page="always">
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
font-weight="bold" text-align="left" background-color="#CCCCCC">Business
Type</fo:block>
</fo:table-cell>
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
font-weight="bold" text-align="left" background-color="#CCCCCC">Gross
Annual Receipts</fo:block>
</fo:table-cell>
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
font-weight="bold" text-align="left" background-color="#CCCCCC">Endorsement
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="businessLiability">
<xsl:if test="string-length(businessType) > 0">
<fo:table-row keep-with-next.within-page="
always">
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
text-align="left"><xsl:value-of select="businessType"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
text-align="left"><xsl:value-of select="
format-number(number(grossReceipts),'#,###,###,###')"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid .75">
<fo:block overflow="visible"
text-align="left"><xsl:value-of select="endorsement"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:if>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
__________________________________________
The information contained in this message may be privileged and
confidential and protected from disclosure. If you are not the intended
recipient of this message, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us immediately
by replying to the message, and please delete it from your computer.
Re: FOP 0.95beta: Problem with fo:block-container absolute-position="absolute"
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Should be fixed now in the 0.95 branch:
http://svn.apache.org/viewvc?rev=651302&view=rev
On 24.04.2008 16:48:28 Jeremias Maerki wrote:
> Right, that's a regression. I haven't caught it because there's no test
> case that creates a viewport/reference pair in a reference area. I've
> already fixed it locally and I'm not in the process of testing with all
> output formats. Laurent, thanks for reporting the issue!
>
> Andreas, the problem is due to my refactoring of the BlockViewport
> handling where I disentangled the operations done there. The result of
> the disentanglement means that a reference area now really should create
> a new coordinate system like the XSL spec says (i.e. saveGraphicsState,
> transform, restoreGraphicsState). Before the refactoring this was
> somehow performed all together in that one transformation that happened.
> And since the reference area that is a direct child of a viewport
> usually doesn't have any offsets this didn't show up in my tests.
>
> On 23.04.2008 21:04:35 Andreas Delmelle wrote:
> > On Apr 23, 2008, at 15:54, Laurent Balthasar wrote:
> >
> > Hi
> >
> > > The idea is to put an image in a table row and use an absolute
> > > position to
> > > write text on it.
> > > With fop 95beta, it seems the absolute position is taken from the
> > > page and
> > > not from the containing bloc like fop 0.94 used to do.
> > > I think 0.95 use wrong positionning, but i'm not sure.
> > > Is it a bug from 0.94 or from 0.95?
> >
> > AFAICT, it is a regression in 0.95.
> >
> > From XSL-FO 1.1
> > ---
> > 7.6.1 "absolute-position"
> > ...
> >
> > absolute:
> >
> > The area's position (and possibly size) is specified with the "left",
> > "right", "top", and "bottom" properties. These properties specify
> > offsets with respect to the area's nearest ancestor reference area.
> >
> > ---
> >
> > and
> >
> > ---
> >
> > 6.7.10 "fo:table-cell"
> >
> > ...
> >
> > Areas:
> >
> > The fo:table-cell formatting object generates one or more normal
> > reference-areas
> >
> > ---
> >
> > According to these definitions, the nearest ancestor reference area
> > (= the basis for the absolute-position) of the fo:block-container is
> > the area generated by the containing fo:table-cell.
> >
> > Note: NOT the fo:block, since that generates only 'normal block
> > areas', no 'reference areas'.
> >
> > No immediate idea on the cause ... yet. ;-)
> >
> >
> >
> > Cheers
> >
> >
> >
> > Andreas
>
>
>
> Jeremias Maerki
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container absolute-position="absolute"
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Right, that's a regression. I haven't caught it because there's no test
case that creates a viewport/reference pair in a reference area. I've
already fixed it locally and I'm not in the process of testing with all
output formats. Laurent, thanks for reporting the issue!
Andreas, the problem is due to my refactoring of the BlockViewport
handling where I disentangled the operations done there. The result of
the disentanglement means that a reference area now really should create
a new coordinate system like the XSL spec says (i.e. saveGraphicsState,
transform, restoreGraphicsState). Before the refactoring this was
somehow performed all together in that one transformation that happened.
And since the reference area that is a direct child of a viewport
usually doesn't have any offsets this didn't show up in my tests.
On 23.04.2008 21:04:35 Andreas Delmelle wrote:
> On Apr 23, 2008, at 15:54, Laurent Balthasar wrote:
>
> Hi
>
> > The idea is to put an image in a table row and use an absolute
> > position to
> > write text on it.
> > With fop 95beta, it seems the absolute position is taken from the
> > page and
> > not from the containing bloc like fop 0.94 used to do.
> > I think 0.95 use wrong positionning, but i'm not sure.
> > Is it a bug from 0.94 or from 0.95?
>
> AFAICT, it is a regression in 0.95.
>
> From XSL-FO 1.1
> ---
> 7.6.1 "absolute-position"
> ...
>
> absolute:
>
> The area's position (and possibly size) is specified with the "left",
> "right", "top", and "bottom" properties. These properties specify
> offsets with respect to the area's nearest ancestor reference area.
>
> ---
>
> and
>
> ---
>
> 6.7.10 "fo:table-cell"
>
> ...
>
> Areas:
>
> The fo:table-cell formatting object generates one or more normal
> reference-areas
>
> ---
>
> According to these definitions, the nearest ancestor reference area
> (= the basis for the absolute-position) of the fo:block-container is
> the area generated by the containing fo:table-cell.
>
> Note: NOT the fo:block, since that generates only 'normal block
> areas', no 'reference areas'.
>
> No immediate idea on the cause ... yet. ;-)
>
>
>
> Cheers
>
>
>
> Andreas
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.95beta: Problem with fo:block-container absolute-position="absolute"
Posted by Andreas Delmelle <an...@telenet.be>.
On Apr 23, 2008, at 15:54, Laurent Balthasar wrote:
Hi
> The idea is to put an image in a table row and use an absolute
> position to
> write text on it.
> With fop 95beta, it seems the absolute position is taken from the
> page and
> not from the containing bloc like fop 0.94 used to do.
> I think 0.95 use wrong positionning, but i'm not sure.
> Is it a bug from 0.94 or from 0.95?
AFAICT, it is a regression in 0.95.
From XSL-FO 1.1
---
7.6.1 "absolute-position"
...
absolute:
The area's position (and possibly size) is specified with the "left",
"right", "top", and "bottom" properties. These properties specify
offsets with respect to the area's nearest ancestor reference area.
---
and
---
6.7.10 "fo:table-cell"
...
Areas:
The fo:table-cell formatting object generates one or more normal
reference-areas
---
According to these definitions, the nearest ancestor reference area
(= the basis for the absolute-position) of the fo:block-container is
the area generated by the containing fo:table-cell.
Note: NOT the fo:block, since that generates only 'normal block
areas', no 'reference areas'.
No immediate idea on the cause ... yet. ;-)
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org