Text decoration is different then intended

Hello
Text decoration is not working as expected. Please see attached console application
Aspose-TextDecorationIssue (1).zip (236.9 KB)

for the issue.

Thanks

@ANDREA.FARRIS
Do you mean the black rectangles that appeared to the left of the text?
1.png (29.9 KB)

No. The underline is not black, is purple. And the html has the property text-decoration.color: black

On the other hand, the strikethrough is black (expected behavior)

Thanks

@ANDREA.FARRIS
Thanks for the explanation, it’s a subtle detail and I might have missed it - I’ll take a closer look at it with higher magnification.

@ANDREA.FARRIS
I checked and reproduced as is for the attached application (without connecting a license).
The html->pdf conversion itself occurs correctly (you can verify this by adding a document save immediately after conversion), the line color changes later when processing the text.
If you add an intermediate document save
(at the moment, the complete document formation is carried out when calling the Save method),

public void ProcessText()
{
    var textFragmentAbsorber = new TextFragmentAbsorber();
    _pdfDocument.Pages.Accept(textFragmentAbsorber);

    foreach (TextFragment textFragment in textFragmentAbsorber.TextFragments)
    {
        ProcessDeletedText(textFragment);
        _pdfDocument.Save(new MemoryStream()); // <-------- with this line is black.
        ProcessInsertedTextV2(textFragment);
    }
}

then in the final document the line will be black.
I regard this as a bug and will create a task for the development team.

@ANDREA.FARRIS
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-59337

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.