Solved

xslt change page positions

Posted on 2014-10-28
6
98 Views
Last Modified: 2015-02-04
When using <fo:repeatable-page-master-alternatives> statement, how to specify page-position=8 (or any other number)?

                 <fo:conditional-page-master-reference master-reference="your-page-1" page-position="first"/>
                 <fo:conditional-page-master-reference master-reference="your-page-2"/> page-position="8"/>
             </fo:repeatable-page-master-alternatives>
 

in other words, we would kile to have all pages portrait, but page 8-10 to be landscape.
0
Comment
Question by:Ess Kay
  • 3
  • 3
6 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40409377
check here
http://www.datypic.com/sc/fo11/a-page-position-1.html
for the only allowed values for page-position in a conditional page master
fixed numbers are not part of that
maybe some processor extensions do that.

Do you need a flow all over the pages or can you break the flows and adddifferent layout options alltogether

It feels to me that you know what data needs to get into the landscape view
maybe you need to tell us more about the requirement
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 40413567
doesnt matter, its adaptable. just need an example on how to change the layout of specific pages to  landscape

IE page 8-10
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40415213
it does matter

- you can't say 8 - 10 here
<fo:conditional-page-master-reference master-reference="your-page-2"/> page-position="8"/>
as I told you

so your options are
- break your flows in different page sequences based on your content
- look for a processor that has an extension that allows this (I don't know any that does)
- do a whole lot of hocus pocus making all portrait but pull out the content for the landscape, stuff that in a different PDF and merge programmatically using iText or something

If you told me what exactly the requirements are, and how the content looks like, I could help you pick the right route
If "doesnt matter" is all I can get from you then "it is impossible apart from the options I told you" is the best I can do
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 15

Author Comment

by:Ess Kay
ID: 40420266
Thank you

can you give an example using blank pages,

where page 1-3  are portrait, and page 4-6 and landscape, then page 7-end are portrait
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 40569195
mmh, for one reason or another I never saw your latest message.

Anyway, out of context this does not make much sense, but here is an example

<?xml version="1.0" encoding="UTF-16"?>
<fo:root font-family="Arial" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master master-name="portrait" page-height="29.7cm" page-width="21cm" margin="1cm">
			<fo:region-body/>
		</fo:simple-page-master>
		<fo:simple-page-master master-name="landscape" page-height="21cm" page-width="29.7cm" margin="1cm">
			<fo:region-body/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="portrait">
		<fo:flow flow-name="xsl-region-body">
			<fo:block page-break-after="always">Page1</fo:block>
			<fo:block page-break-after="always">Page2</fo:block>
			<fo:block>Page3</fo:block>
		</fo:flow>
	</fo:page-sequence>
	<fo:page-sequence master-reference="landscape">
		<fo:flow flow-name="xsl-region-body">
			<fo:block page-break-after="always">Page4</fo:block>
			<fo:block page-break-after="always">Page5</fo:block>
			<fo:block page-break-after="always">Page6</fo:block>
			<fo:block>Page7</fo:block>
		</fo:flow>
	</fo:page-sequence>
	<fo:page-sequence master-reference="portrait">
		<fo:flow flow-name="xsl-region-body">
			<fo:block>Page8</fo:block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>

Open in new window

0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 40588805
Ive not comfirmed this as we have abandoned the project due to lack of information, but thanks anyway
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question