From f1631c890ad90d4e48744b77c6a8992f1821cdc8 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 27 Oct 2022 12:20:46 +0000 Subject: [PATCH] B2022-041: Proms putting extra space after large image in printed output --- PROMS/Volian.Print.Library/vlnParagraph.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 60982a30..b8594f72 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -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");