Solved

xslt change page positions

Posted on 2014-10-28
6
88 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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. 
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now