Skip to content

property line-height #52

@nrodas93

Description

@nrodas93

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);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions