?
Solved

xslt change page positions

Posted on 2014-10-28
6
Medium Priority
?
118 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
Independent Software Vendors: 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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…
Simple Linear Regression

752 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