Skip to content

Method to convert line breaks into markup #7

@becdetat

Description

@becdetat

So "line 1\r\nline 2\r\nline 3" is converted to Word-compatible markup. This would be used like:

_engine.Process("in.docx", "out.docx", new {
    Address = _engine.ConvertLineBreaks("line 1\r\nline 2\r\nline 3")
});

It looks like

public string ConvertLineBreaks(string in) { return in.Replace(Environment.NewLine, "</w:t></w:r><w:r><w:br/><w:t>"); }

will work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions