Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property line-height #52

Closed
carcinos93 opened this issue May 15, 2019 · 0 comments
Closed

property line-height #52

carcinos93 opened this issue May 15, 2019 · 0 comments

Comments

@carcinos93
Copy link

carcinos93 commented May 15, 2019

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

onizet added a commit that referenced this issue Aug 15, 2024
@onizet onizet mentioned this issue Aug 23, 2024
@onizet onizet closed this as completed Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants