B2022-041: Proms putting extra space after large image in printed output

This commit is contained in:
Kathy Ruffing 2022-10-27 12:20:46 +00:00
parent 4b8c133e7e
commit f1631c890a

View File

@ -4170,6 +4170,16 @@ namespace Volian.Print.Library
{
Width = ic.Image_Width;
Height = ic.Image_Height;
// B2022-041: extra whitespace after resized image. Make same adjustment here that gets made in ParagrphToPdf
float mult = 1.0F;
if (Width > (vlnParagraph.wMax - 12)) mult = (vlnParagraph.wMax - 24) / Width;
if (Height > (vlnParagraph.hMax - 36)) mult = Math.Min(mult, (vlnParagraph.hMax - 36) / Height);
if (mult < 1.0F)
{
Width = Width * mult;
Height = Height * mult;
}
}
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS");