[DF-2812] Added missed code for scalePageToFit functionality.