Matrix scalingMatrix = Matrix.getScaleInstance(1f/width,1f/height);
scalingParams = scalingParams.multiply( scalingMatrix );
Matrix translationParams = unrotatedCTM.extractTranslating();
Matrix translationMatrix = null;
int pageRotation = page.findRotation();
if( pageRotation == 0 )
{
translationParams.setValue(2,1, -translationParams.getValue( 2,1 ));
translationMatrix = Matrix.getTranslatingInstance(
0, (float)pageSize.getHeight()-height*scalingParams.getYScale() );