Solved

xslt change page positions

Posted on 2014-10-28
6
105 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

732 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