Closed carcinos93 closed 1 month ago
hi everyone. i've tried to use line-height property, but doesn't work. I wonder if property can be used?
Thanks for all!!
UPDATE: I did this for solve my problem.
I added this in Converter.cs
public static SpacingBetweenLines ToSpacingBetweenLines(string html) { if (html == null) return null; SpacingBetweenLines spacingBetweenLines = new SpacingBetweenLines(); spacingBetweenLines.LineRule = LineSpacingRuleValues.Exact; Unit unit = Unit.Parse(html); if (unit.IsValid || unit.Value > 0) spacingBetweenLines.Line = (unit.Value * 20.0).ToString();
//spacingBetweenLines.Before ="0"; //spacingBetweenLines.After = "0"; return spacingBetweenLines; }
Edit 2 ParagraphStyleCollection.cs attrValue = en.StyleAttributes["line-height"]; if (attrValue != null && en.CurrentTag != "") { var spacing = Converter.ToSpacingBetweenLines(attrValue); if (spacing != null) { containerStyleAttributes.Add(spacing); } }
hi everyone. i've tried to use line-height property, but doesn't work. I wonder if property can be used?
Thanks for all!!
UPDATE: I did this for solve my problem.
I added this in Converter.cs
public static SpacingBetweenLines ToSpacingBetweenLines(string html) { if (html == null) return null; SpacingBetweenLines spacingBetweenLines = new SpacingBetweenLines(); spacingBetweenLines.LineRule = LineSpacingRuleValues.Exact; Unit unit = Unit.Parse(html); if (unit.IsValid || unit.Value > 0) spacingBetweenLines.Line = (unit.Value * 20.0).ToString();
Edit 2 ParagraphStyleCollection.cs attrValue = en.StyleAttributes["line-height"]; if (attrValue != null && en.CurrentTag != "") { var spacing = Converter.ToSpacingBetweenLines(attrValue); if (spacing != null) { containerStyleAttributes.Add(spacing); } }