Bug 198054 The width of the page is not the same in PDF and POSTSCRIPT [1201]
Description: The width of the page is not the same in PDF and POSTSCRIPT. Build number: 2.2.1.v20070727-0630 Steps to reproduce: 1. Preview the attached design file in PDF and POSTSCRIPT. Expected result: Page width of PDF and POSTSCRIPT are the same. Actual result: Page of POSTSCRIPT is wider than PDF(See the screenshot). Error log: N/A
engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/PostscriptWriter.java
*            the repeat mode.
	 * @throws IOException
	 *             when the iamge cann't be read from the url.
	 */
	public void drawBackgroundImage( String imageURI, float x, float y,
			float width, float height, float positionX, float positionY,
			String repeat ) throws IOException
	{
		URL url = new URL( imageURI );
		InputStream imageStream = null;
		try
		{
			imageStream = url.openStream( );
			Image image = ImageIO.read( imageStream );
			ImageSource imageSource = getImageSource( image );
			Position areaPosition = new Position( x, y );
			Position areaSize = new Position( width, height );
			Position imagePosition = new Position( x + positionX, y + positionY );
			
			
			Position imageSize = new Position( imageSource.getWidth( ),
					imageSource.getHeight( ) );
			BackgroundImageLayout layout = new BackgroundImageLayout(
					areaPosition, areaSize, imagePosition, imageSize );
			Collection positions = layout.getImagePositions( repeat );
			gSave( );
			out.println( "clipsave" );
			setColor( Color.WHITE );
			out.println( "newpath" );
			drawRawRect( x, y, width, height );