![]() |
repeated body in multiple pages |
Post Reply
|
| Author | |
dkalyan3
Newbie
Joined: 05 Jul 2010 Posts: 4 |
Quote Reply
Topic: repeated body in multiple pagesPosted: 21 Jul 2010 at 12:54am |
|
Hi,
my template has 3 pages in which all the pages have same body content and header. only difference is footer.
I tried the following code but it didn't work for 3 pages. its showing only first page.
need soon help in this case.
<fo:layout-master-set>
<fo:simple-page-master margin-top="1.100cm" margin-bottom="1.4cm" margin-right="0.8cm" margin-left="1.4cm" master-name="first-page" page-width="8.300in" page-height="11.700in"> <fo:region-body margin-top="1.400cm" margin-bottom="0.7cm" region-name="xsl-region-body"/> <fo:region-before region-name="xsl-region-before" extent="1.400cm" display-align="before"/> <fo:region-after region-name="xsl-region-after1" extent="0.7cm"/> </fo:simple-page-master> <fo:simple-page-master margin-top="1.100cm" margin-bottom="1.4cm" margin-right="0.8cm" margin-left="1.4cm" master-name="second-page" page-width="8.300in" page-height="11.700in"> <fo:region-body margin-top="1.400cm" margin-bottom="0.7cm" region-name="xsl-region-body"/> <fo:region-before region-name="xsl-region-before" extent="1.400cm" display-align="before"/> <fo:region-after region-name="xsl-region-after2" extent="0.7cm"/> </fo:simple-page-master> <fo:simple-page-master margin-top="1.100cm" margin-bottom="1.4cm" margin-right="0.8cm" margin-left="1.4cm" master-name="third-page" page-width="8.300in" page-height="11.700in"> <fo:region-body margin-top="1.400cm" margin-bottom="0.7cm" region-name="xsl-region-body"/> <fo:region-before region-name="xsl-region-before" extent="1.400cm" display-align="before"/> <fo:region-after region-name="xsl-region-after3" extent="0.7cm"/> </fo:simple-page-master> <fo:page-sequence-master master-name="default-sequence"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="first-page" page-position="first"/> <fo:conditional-page-master-reference master-reference="second-page" page-position="any"/> <fo:conditional-page-master-reference master-reference="third-page" page-position="last"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="default-sequence"> <fo:static-content flow-name="xsl-region-before" font-family="Helvetica" font-size="12pt"> <fo:block text-align="right">Header</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after1" font-family="Helvetica" font-size="8pt"> <fo:block text-align="right" font-weight="bold">FOOTER 1</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after2" font-family="Helvetica" font-size="8pt"> <fo:block text-align="right" font-weight="bold">FOOTER 2</fo:block> </fo:static-content> <fo:static-content flow-name="xsl-region-after3" font-family="Helvetica" font-size="8pt"> <fo:block text-align="right" font-weight="bold">FOOTER 3</fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body" font-family="Times" font-size="12pt"> <fo:block>THIS IS TEMPLATE</fo:block> </fo:flow> </fo:page-sequence> </xfd:document> thanks in advance.
Guru.
|
|
![]() |
|
gabig
Admin Group
Joined: 06 Aug 2008 Posts: 82 |
Quote Reply
Posted: 21 Jul 2010 at 2:52am |
|
Hi,
There are a few mistakes in your template. First, in the page-sequence-master, the more particular rules should be at the top. So instead of: <fo:conditional-page-master-reference master-reference="first-page" page-position="first"/> <fo:conditional-page-master-reference master-reference="second-page" page-position="any"/> <fo:conditional-page-master-reference master-reference="third-page" page-position="last"/> You should write: <fo:conditional-page-master-reference master-reference="first-page" page-position="first"/> <fo:conditional-page-master-reference master-reference="third-page" page-position="last"/> <fo:conditional-page-master-reference master-reference="second-page" page-position="any"/> Second, you're only getting one page because there's only enough content to generate one page. Replace your fo:flow contents with this: <fo:block>THIS IS TEMPLATE</fo:block> <fo:block break-before="page">THIS IS TEMPLATE</fo:block> <fo:block break-before="page">THIS IS TEMPLATE</fo:block> Now all 3 pages will get generated. Thanks, Gabi |
|
![]() |
|
dkalyan3
Newbie
Joined: 05 Jul 2010 Posts: 4 |
Quote Reply
Posted: 21 Jul 2010 at 3:29am |
|
thanks for ur reply. but its not the issue in my case.
i want the first page content to be repeated again in the second page with the footer changed.Is there any way so that i can point the second page to take its content from the first page.
|
|
![]() |
|
gabig
Admin Group
Joined: 06 Aug 2008 Posts: 82 |
Quote Reply
Posted: 21 Jul 2010 at 3:41am |
|
I'm afraid you will still need to repeat the contents. You can use an fo:marker to place your contents in it and then re-use those with fo:retrieve-marker on each page. See: http://www.w3.org/TR/xsl/#fo_marker
Regards, Gabi |
|
![]() |
|
gabig
Admin Group
Joined: 06 Aug 2008 Posts: 82 |
Quote Reply
Posted: 21 Jul 2010 at 4:36am |
|
There's also the option of implementing an extension for what you need. Please contact support for more details.
Thanks, Gabi |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |