landscape format in PDF with XSL-FO

2003-05-15 Thread Zmitko, Jan
Hello together,

can anybody told me how to generate PDF with landscape format?

Thanks

Jan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: landscape format in PDF with XSL-FO

2003-05-15 Thread William Gilbert
 Hello together,
 
 can anybody told me how to generate PDF with landscape format?
 
 Thanks
 
 Jan

Here's a method we use in all of our reports, user has a check box which set
an input parameter, doc-orientation, passed to the FOP servlet.


  xsl:param name=doc-orientation select='portrait'/

 .  
 .  
 .  
 

 !-- Page orientation determined by 'doc-orientation' input parameter  --

  xsl:variable name=pageheight
xsl:choose
  xsl:when test=$doc-orientation='landscape'8.5/xsl:when
  xsl:otherwise11/xsl:otherwise
/xsl:choose
  /xsl:variable

  xsl:variable name=pagewidth
xsl:choose
  xsl:when test=$doc-orientation='landscape'11/xsl:when
  xsl:otherwise8.5/xsl:otherwise
   /xsl:choose
  /xsl:variable

 .  
 .  
 .  
 
 !-- Local variables, derived from page dimensions and orientation --

  xsl:variable name=margin select=0.5/
  xsl:variable name=region-margin select=0.5/
  xsl:variable name=bodywidth select=$pagewidth - ((2 * $margin) +
$region-margin)/
 
.  
 .  
 .  

 
fo:layout-master-set
fo:simple-page-master master-name=Report-Page
page-height={$pageheight}in
page-width={$pagewidth}in
margin-left={$margin + 0.25}in
margin-right={$margin + 0.25}in
margin-top={$margin}in
margin-bottom={$margin}in
fo:region-before extent={$region-margin}in/
fo:region-after extent={$region-margin}in/
fo:region-body margin-top={$region-margin}in
margin-bottom={$region-margin}in /
/fo:simple-page-master


!-- Set up the sequence of pages --

fo:page-sequence-master master-name=Report-Contents
fo:repeatable-page-master-alternatives
fo:conditional-page-master-reference
master-reference=Report-Page odd-or-even=any/
/fo:repeatable-page-master-alternatives
/fo:page-sequence-master
/fo:layout-master-set



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: landscape format in PDF with XSL-FO

2003-05-15 Thread Zmitko, Jan
Thanks Willian and Tim

-Ursprungliche Nachricht-
Von: William Gilbert [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 15. Mai 2003 17:32
An: [EMAIL PROTECTED]
Betreff: Re: landscape format in PDF with XSL-FO


 Hello together,
 
 can anybody told me how to generate PDF with landscape format?
 
 Thanks
 
 Jan

Here's a method we use in all of our reports, user has a check box which set
an input parameter, doc-orientation, passed to the FOP servlet.


  xsl:param name=doc-orientation select='portrait'/

 .  
 .  
 .  
 

 !-- Page orientation determined by 'doc-orientation' input parameter  --

  xsl:variable name=pageheight
xsl:choose
  xsl:when test=$doc-orientation='landscape'8.5/xsl:when
  xsl:otherwise11/xsl:otherwise
/xsl:choose
  /xsl:variable

  xsl:variable name=pagewidth
xsl:choose
  xsl:when test=$doc-orientation='landscape'11/xsl:when
  xsl:otherwise8.5/xsl:otherwise
   /xsl:choose
  /xsl:variable

 .  
 .  
 .  
 
 !-- Local variables, derived from page dimensions and orientation --

  xsl:variable name=margin select=0.5/
  xsl:variable name=region-margin select=0.5/
  xsl:variable name=bodywidth select=$pagewidth - ((2 * $margin) +
$region-margin)/
 
.  
 .  
 .  

 
fo:layout-master-set
fo:simple-page-master master-name=Report-Page
page-height={$pageheight}in
page-width={$pagewidth}in
margin-left={$margin + 0.25}in
margin-right={$margin + 0.25}in
margin-top={$margin}in
margin-bottom={$margin}in
fo:region-before extent={$region-margin}in/
fo:region-after extent={$region-margin}in/
fo:region-body margin-top={$region-margin}in
margin-bottom={$region-margin}in /
/fo:simple-page-master


!-- Set up the sequence of pages --

fo:page-sequence-master master-name=Report-Contents
fo:repeatable-page-master-alternatives
fo:conditional-page-master-reference
master-reference=Report-Page odd-or-even=any/
/fo:repeatable-page-master-alternatives
/fo:page-sequence-master
/fo:layout-master-set



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Landscape format

2002-11-29 Thread Sylvie Picouet
How is it possible to get some pages of a pdf document in the landscape format ?
Thanks for your help.

Sylvie.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Landscape format

2002-11-29 Thread Alexander Koppelhuber
Simply set page-height and page-width to the right values.
(or just switch the values)

The following part gives you a DIN A4 page in landscape.

fo:layout-master-set
fo:simple-page-master master-name=basic page
   page-height=210mm
   page-width=297mm
   margin-top=0cm
   margin-bottom=0cm
   margin-left=0mm
   margin-right=0mm
fo:region-body margin-top=0cm
margin-right=5mm/
!--fo:region-after extent=2cm/ --
/fo:simple-page-master
/fo:layout-master-set

-Ursprungliche Nachricht-
Von: Sylvie Picouet [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 29. November 2002 18:18
An: '[EMAIL PROTECTED]'
Betreff: Landscape format


How is it possible to get some pages of a pdf document in the landscape
format ?
Thanks for your help.

Sylvie.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Landscape format

2002-11-29 Thread Alexander Koppelhuber
Take a look at this tutorial:
http://www.renderx.com/Tests/doc/fo/tutorial.pdf

Chapter 6 contains some explanation and examples
for page layouts.

Should help you with your problem, Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Landscape format

2002-11-29 Thread chris
Hi Sylvie

It is not possible to change format during one single page sequence.
So you need to define TWO simple-page-masters with different name and
the switched values (as it was written by Alexander Koppelhuber).
Then define a new page sequences where you want to change the format:

fo:page-sequence master-name=A4normal
  fo:flow flow-name=xsl-region-body
!-- your content on the normal page --
  /fo:flow
/fo:page-sequence
!-- NEW PAGE --
fo:page-sequence master-name=A4landscape
  fo:flow flow-name=xsl-region-body
!-- your content on the landscape page
  /fo:flow
/fo:page-sequence
!-- NEW PAGE --
fo:page-sequence master-name=A4normal
  fo:flow flow-name=xsl-region-body
!-- your content on the normal page --
  /fo:flow
/fo:page-sequence

and so on...

Regards, Chris Wysseier

 Original Message 
Von: [EMAIL PROTECTED]
An: [EMAIL PROTECTED], 
Betreff: RE: Landscape format
Datum: Fri, 29 Nov 2002 18:54:18 +0100

Yes, but I don't see how to switch from one format to the other.
Do I need to stop the sequence and start another one ?
I can't manage to do that.

Sylvie.

-Message d'origine-
De:Alexander Koppelhuber [SMTP:[EMAIL PROTECTED]
Date:  vendredi 29 novembre 2002 18:32
A: [EMAIL PROTECTED]; Sylvie PICOUET
Objet: AW: Landscape format

Simply set page-height and page-width to the right values.
(or just switch the values)

The following part gives you a DIN A4 page in landscape.

fo:layout-master-set
fo:simple-page-master master-name=basic page
   page-height=210mm
   page-width=297mm
   margin-top=0cm
   margin-bottom=0cm
   margin-left=0mm
   margin-right=0mm
fo:region-body margin-top=0cm
margin-right=5mm/
!--fo:region-after extent=2cm/ --
/fo:simple-page-master
/fo:layout-master-set

-Ursprungliche Nachricht-
Von: Sylvie Picouet [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 29. November 2002 18:18
An: '[EMAIL PROTECTED]'
Betreff: Landscape format


How is it possible to get some pages of a pdf document in the 
landscape
format ?
Thanks for your help.

Sylvie.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]