Hi,

Jeremais and I have been talking a while on the mailing list about this (I
almost asked the same question). PDF *does not* hold any informatio about
neither page orientation nor paper size. This is actually part of its
(portability). You must pass the correct parameters to Acrobat so as to
adjust orientation and paper size, and set them correctly in the ps file
that is actually printed. Your Acrobat call would look similar to this:

acroread -toPostScript -landscape -size A4 pdffile.pdf psfile.ps

-----Original Message-----
From: Henriksen Niels Kristoffer [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 12:45 PM
To: '[EMAIL PROTECTED]'
Subject: Can FOP tell Acrobat Reader about wanted orientation?


Hi foppers!

I'm using reports in the PDF format using an XSL-stylesheet on an XML-souce,
using FOP-0.20.3.

I will need to control the orientation of the output - for some reports I
need portrait orientation, for others I need landscape. My current problem
is with landscape.

In my style sheet, I try to control this by setting page-width="297mm"
page-height="210mm". FOP runs fine from a command line and my Adobe Acrobat
Reader 5.0 displays the result in landscape. The <xsl:template match = />
tag is include below.

However, to get the thing printed right, I currently have to MANUALLY set
"Copies and Adjustment" radio buttons in the Adobe Acrobat Reader 5.0 print
pop-up as follows

"Shrink oversized pages to paper size" CHECKED
"Expand small pages to paper size" NOT CHECKED
"Auto-rotate and center pages" NOT CHECKED

Thsi is higly inconvenient for our end useres.

(Also I must set paper orientation to landscape in the printer properties,
but I recognize that this has nothing to do with FOP).

My question: assuming, that "Copies and Adjustment" settings are part of the
Acrobat Reader's settings for that document, is there any way to set these
settings in the style sheet and getting FOP to tell Acrobat Reader about it?

Or, more general, what are the possibilities with FOP to control page
orientation in the resulting PDF?

Any suggestions are warmly welcomed

Kind regards

Niels K. Henriksen.

        <xsl:template match="/">
                <fo:root>
        
                        <fo:layout-master-set>
                                <fo:simple-page-master
master-name="A4"
        
page-width="297mm"      page-height="210mm"
        
margin-top="20mm"               margin-bottom="15mm"
        
margin-left="15mm"              margin-right="15mm">
                                        <fo:region-before extent="20mm"/>
                                        <fo:region-body margin-top="20mm"/>
                                </fo:simple-page-master>
                        </fo:layout-master-set>
                        
                        <fo:page-sequence master-reference="A4">
                        
                                <fo:static-content
flow-name="xsl-region-before">
                                        <xsl:apply-templates
select="/TI025U/Bestilling"/>
                                </fo:static-content>
                                
                                <fo:flow flow-name="xsl-region-body">
                                        <xsl:apply-templates
select="/TI025U/TilmeldingListe"/>
                                        <fo:block id="last-page-number"/>
                                        <!-- This block serves as a
point-of-identification for something on the last page -
                                                it is needed for total
number of pages.
                                        -->
                                </fo:flow>
                                
                        </fo:page-sequence>
                        
                </fo:root>
        </xsl:template>

Reply via email to