Bug 25882 - PS-Renderer doesn't generate pages in landscape orientation
Summary: PS-Renderer doesn't generate pages in landscape orientation
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: Other Windows XP
: P3 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-03 21:43 UTC by Markus Steiner
Modified: 2012-04-01 06:58 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Steiner 2004-01-03 21:43:20 UTC
The ps-renderer doesn't produce correct output if the page format is defined 
as landscape. 
I tested the outpot wit following fo-file:

<?xml version="1.0" encoding="utf-8"?>

<fo:root font-family="Times Roman" font-size="12pt"  
xmlns:fo="http://www.w3.org/1999/XSL/Format">

	<fo:layout-master-set>
		<!-- layout for the first page -->
		<fo:simple-page-master master-name="A4-landscape" reference-
orientation="90"
			page-height="21cm" page-width="29.7cm" >
			margin-top="1cm" margin-bottom="1cm" margin-left="1cm" 
margin-right="1cm">
            		<fo:region-body></fo:region-body>
		</fo:simple-page-master>	
	</fo:layout-master-set>
 

  <fo:page-sequence master-reference="A4-landscape">

  <fo:flow flow-name="xsl-region-body">
  <fo:block font-size="18pt" font-weight="bold"> FOP test line </fo:block>
  </fo:flow>
</fo:page-sequence>

</fo:root>

With the PDF-renderer the output is correct. In my project I can not use the 
PDF-renderer. I have to produce documents with differnt EPS-images in it. EPS-
images will not be converted by PDF-renderer. PDF-files will be generated 
by "distiller".

regards
markus steiner
Comment 1 Jeremias Maerki 2004-01-04 17:39:26 UTC
Either you can try the AutoRotate functionality of the PSRenderer (see link 
below) or you can hack in a few lines in PSRenderer.java just before the 
following line in renderPage():

        writeln("0.001 0.001 scale");

The lines to insert are: 

        writeln("<<");
        writeln("/PageSize [" + Math.round(pspagewidth) + " " + Math.round
(pspageheight) + "]");
        writeln("/ImagingBBox null");
        writeln(">> setpagedevice");

Note: this is only roughly tested and is probably incorrect when AutoRotate is 
used together with this hack but it should work in your case. Remember to 
rebuild FOP after that.

The reason for this is the missing PageSize. Distiller doesn't interpret DSC 
comments where this information is provided already.

AutoRotate functionality:
http://marc.theaimsgroup.com/?l=fop-dev&m=105059583307703&w=2

(keeping this bug open as a reminder and a note to myself: HEAD's PSRenderer 
is also missing this, but the Transcoder has is already.)
Comment 2 Pascal Sancho 2007-11-20 01:19:55 UTC
Fixed in FOP 0.94 and probably earlier versions
Comment 3 Glenn Adams 2012-04-01 06:58:32 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed