Solved

xslt change page positions

Posted on 2014-10-28
6
91 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

911 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