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 Ganesh <ga...@wipro.com> on 2003/09/18 17:10:34 UTC
XSL-FO - page borders
Hi,
It will be great if you guys can help me with the following in XSL-FO...
I want a LEFT page border that runs from the top of the page till the
end of the page, how can I do this using XSL-FO? I assume that is has to
be done in the simple-page-master...
I tried the following in the simple page master, it didn't work, any
clue?, am I going in the right direction?
<fo:region-body border-left-style="solid" border-left-width="2mm"
margin-top="3cm" margin-bottom="1cm"/>
With the above statement I got NO border at all.
Thanks for any inputs.
Regards,
Ganesh
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
Re: XSL-FO - page borders - Correction
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ganesh wrote:
> I see a minor glitch with it although. The border does not start from
> TIP of the page, there is around 1cm gap before the border starts. But
> the border goes till the TIP of the end of the page.
Beside page margins, as already mentioned, check also whether
your printer can actually print to the whole sheet, and whether
the paper is properly adjusted. Most laser printers and many
others can't print on the whole paper sheet. A 1cm margin seems
to be a bit large for a modern printer, although this was still
quite common until 7 years ago or so.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
Ganesh,
Are you sure you put the margin-top on the simple-page-master to zero?
Greetz,
Andreas
> -----Original Message-----
> From: Ganesh [mailto:ganesh.raman@wipro.com]
> Sent: maandag 22 september 2003 15:37
> To: fop-user@xml.apache.org
> Subject: RE: XSL-FO - page borders - Correction
>
>
>
>
> Thanks for helping me out. It solved my page border issue.
> I see a minor glitch with it although. The border does not start from
> TIP of the page, there is around 1cm gap before the border starts. But
> the border goes till the TIP of the end of the page. I can explain the
> business person if this is a limitation, just wanna know from experts.
>
> Regards,
> Ganesh
>
>
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> Sent: Saturday, September 20, 2003 8:32 PM
> To: fop-user@xml.apache.org; a_l.delmelle@pandora.be
> Subject: RE: XSL-FO - page borders - Correction
>
>
> > -----Original Message-----
> > From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> > Sent: zaterdag 20 september 2003 16:29
> > To: fop-user@xml.apache.org
> > Subject: RE: XSL-FO - page borders - Correction
> >
> >
> > > -----Original Message-----
> > > From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> > >
> > >
> > > Andreas L. Delmelle wrote:
> > > > Correction: can be solved with only 1 block-container, as Jorg
> > > suggested.
> > > > Trick is to put in a dummy-block with a line-height equal to
> > that of the
> > > > page, so
> > >
> > > Well, the advantage of a block-container is that you can explicitely
>
> > > set width and height:
> > > <fo:static-content flow-name="xsl-region-start">
> > > <fo:block-container border-right-width="0.5mm"
> > > border-right-style="solid"
> > > position="absolute" top="0mm" left="0mm" width="20mm"
> > > height="297mm"/>
> > > ...
> >
> > Curious... I had tried this, but got no borders unless I made
> > that container
> > contain something...
> >
> >
>
> Problem solved: I forgot to set the 'position'-attribute... :)
>
> Greetz,
>
>
> Andreas Delmelle
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
> **************************Disclaimer************************************
>
> Information contained in this E-MAIL being proprietary to Wipro
> Limited is
> 'privileged' and 'confidential' and intended for use only by the
> individual
> or entity to which it is addressed. You are notified that any
> use, copying
> or dissemination of the information contained in the E-MAIL in any manner
> whatsoever is strictly prohibited.
>
> ******************************************************************
> *********
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by Ganesh <ga...@wipro.com>.
Thanks for helping me out. It solved my page border issue.
I see a minor glitch with it although. The border does not start from
TIP of the page, there is around 1cm gap before the border starts. But
the border goes till the TIP of the end of the page. I can explain the
business person if this is a limitation, just wanna know from experts.
Regards,
Ganesh
-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: Saturday, September 20, 2003 8:32 PM
To: fop-user@xml.apache.org; a_l.delmelle@pandora.be
Subject: RE: XSL-FO - page borders - Correction
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> Sent: zaterdag 20 september 2003 16:29
> To: fop-user@xml.apache.org
> Subject: RE: XSL-FO - page borders - Correction
>
>
> > -----Original Message-----
> > From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> >
> >
> > Andreas L. Delmelle wrote:
> > > Correction: can be solved with only 1 block-container, as Jorg
> > suggested.
> > > Trick is to put in a dummy-block with a line-height equal to
> that of the
> > > page, so
> >
> > Well, the advantage of a block-container is that you can explicitely
> > set width and height:
> > <fo:static-content flow-name="xsl-region-start">
> > <fo:block-container border-right-width="0.5mm"
> > border-right-style="solid"
> > position="absolute" top="0mm" left="0mm" width="20mm"
> > height="297mm"/>
> > ...
>
> Curious... I had tried this, but got no borders unless I made
> that container
> contain something...
>
>
Problem solved: I forgot to set the 'position'-attribute... :)
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> Sent: zaterdag 20 september 2003 16:29
> To: fop-user@xml.apache.org
> Subject: RE: XSL-FO - page borders - Correction
>
>
> > -----Original Message-----
> > From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
> >
> >
> > Andreas L. Delmelle wrote:
> > > Correction: can be solved with only 1 block-container, as Jorg
> > suggested.
> > > Trick is to put in a dummy-block with a line-height equal to
> that of the
> > > page, so
> >
> > Well, the advantage of a block-container is that you can
> > explicitely set width and height:
> > <fo:static-content flow-name="xsl-region-start">
> > <fo:block-container border-right-width="0.5mm"
> > border-right-style="solid"
> > position="absolute" top="0mm" left="0mm" width="20mm"
> > height="297mm"/>
> > ...
>
> Curious... I had tried this, but got no borders unless I made
> that container
> contain something...
>
>
Problem solved: I forgot to set the 'position'-attribute... :)
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
>
>
> Andreas L. Delmelle wrote:
> > Correction: can be solved with only 1 block-container, as Jorg
> suggested.
> > Trick is to put in a dummy-block with a line-height equal to that of the
> > page, so
>
> Well, the advantage of a block-container is that you can
> explicitely set width and height:
> <fo:static-content flow-name="xsl-region-start">
> <fo:block-container border-right-width="0.5mm"
> border-right-style="solid"
> position="absolute" top="0mm" left="0mm" width="20mm"
> height="297mm"/>
> ...
Curious... I had tried this, but got no borders unless I made that container
contain something...
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: XSL-FO - page borders - Correction
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas L. Delmelle wrote:
> Correction: can be solved with only 1 block-container, as Jorg suggested.
> Trick is to put in a dummy-block with a line-height equal to that of the
> page, so
Well, the advantage of a block-container is that you can
explicitely set width and height:
<fo:static-content flow-name="xsl-region-start">
<fo:block-container border-right-width="0.5mm" border-right-style="solid"
position="absolute" top="0mm" left="0mm" width="20mm" height="297mm"/>
...
Correct for the right measurements.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
> <fo:block line-height="29.7mm"
^^^^^^^
TYPO: Should be '29.7cm' or '297mm'. Whatever you prefer...
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders - Correction
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
>
> region-after (leave the height as it is). So with two block-containers per
> page, placed in a static-content, you should get the intended
> result. Also,
Correction: can be solved with only 1 block-container, as Jorg suggested.
Trick is to put in a dummy-block with a line-height equal to that of the
page, so
- in 'simple-page-master' add
<fo:region-start extent="[enough to hold dummy text]"/>
( Note: if the extent is not enough to hold the dummy text you will get
warnings of the type 'Area content overflows area inline' - these don't
necessarily have an impact on the printed layout.)
- in 'page-sequence-master' add
<fo:static-content flow-name="xsl-region-start">
<fo:block-container border-right-width="0.5mm" border-right-style="solid">
<fo:block line-height="29.7mm" color="white">dummy</fo:block>
</fo:block-container>
</fo:static-content>
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: XSL-FO - page borders
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Ganesh [mailto:ganesh.raman@wipro.com]
>
>
> >Some possible approaches:
> >- place an appropriate fo:block-container with a right border
> > in your region-start
>
> I am trying to set the page border that runs from START of the page till
> the END of the page. Thanks for all the suggestions. I have
Ah, you mean the whole page ( not just the region-body ) including the
non-printable area?
> clarification regarding the above suggestion. Does this mean that I will
> have to set block containers border for each of the regions (start,
> body, before, after, end..) I have, or is it enough if I set it for the
> start region. I tried setting in the start region. I get only for start.
So to clear this out: You now get a left-border on each page with height
equal to the height of the region-body. Correct?
If you're not going to use the region-before, you can make its height match
that of (region-before + region-body), and set another just for the
region-after (leave the height as it is). So with two block-containers per
page, placed in a static-content, you should get the intended result. Also,
set the margin-top and margin-bottom for the simple-page-master to zero to
include the non-printable area.
Check attached fo for more details. ( This was the closest I could get to
having a border drawn across the whole page. )
> Also I really do NOT want to set a block container for body region as it
> may span across many pages and may end up in a memory issue !! Am I
> right in saying so?
I'm not sure about the memory issue, but one thing I do know for certain is
that in that case, your last page would only contain a left-border up to the
last line of text...
Hope this helps.
Greetz,
Andreas Delmelle
RE: XSL-FO - page borders
Posted by Ganesh <ga...@wipro.com>.
>Some possible approaches:
>- place an appropriate fo:block-container with a right border
> in your region-start
I am trying to set the page border that runs from START of the page till
the END of the page. Thanks for all the suggestions. I have
clarification regarding the above suggestion. Does this mean that I will
have to set block containers border for each of the regions (start,
body, before, after, end..) I have, or is it enough if I set it for the
start region. I tried setting in the start region. I get only for start.
Also I really do NOT want to set a block container for body region as it
may span across many pages and may end up in a memory issue !! Am I
right in saying so?
It will be great if any one can post a sample XSL-fo for setting the
left page borders?
Regards,
Ganesh
-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: Friday, September 19, 2003 3:17 AM
To: fop-user@xml.apache.org
Subject: Re: XSL-FO - page borders
Ganesh wrote:
> I want a LEFT page border that runs from the top of the page till the
> end of the page, how can I do this using XSL-FO? I assume that is has
> to be done in the simple-page-master...
>
> I tried the following in the simple page master, it didn't work, any
> clue?, am I going in the right direction? <fo:region-body
> border-left-style="solid" border-left-width="2mm" margin-top="3cm"
> margin-bottom="1cm"/>
>
> With the above statement I got NO border at all.
You are not supposed to get a border:
http://www.w3.org/TR/xsl/slice6.html#fo_simple-page-master
See "Trait derivation". FOP is just conformant.
Some possible approaches:
- place an appropriate fo:block-container with a right border
in your region-start
- use a SVG in the start region
- use a background image in the start or body region simmulating
the border
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: XSL-FO - page borders
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ganesh wrote:
> I want a LEFT page border that runs from the top of the page till the
> end of the page, how can I do this using XSL-FO? I assume that is has to
> be done in the simple-page-master...
>
> I tried the following in the simple page master, it didn't work, any
> clue?, am I going in the right direction?
> <fo:region-body border-left-style="solid" border-left-width="2mm"
> margin-top="3cm" margin-bottom="1cm"/>
>
> With the above statement I got NO border at all.
You are not supposed to get a border:
http://www.w3.org/TR/xsl/slice6.html#fo_simple-page-master
See "Trait derivation". FOP is just conformant.
Some possible approaches:
- place an appropriate fo:block-container with a right border
in your region-start
- use a SVG in the start region
- use a background image in the start or body region simmulating
the border
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org