Aspose.PDF 19.4.0.0 - TextReplaceOptions.ReplaceAdjustment.None ignored in OutSystems extension

Hello,

I am trying to remove text from PDF files and when doing so there is some text that is moved from the original position.
Even with the TextReplaceOptions.ReplaceAdjustment.None in the TextFragmentAbsorber, it just behave like it is using the default option of adjust.
Bellow is the code that handles this, executed in an extension of OutSystems.

//find slanted text fragments according to imput angle
if ((ssangle > 180) || (ssangle < 0))
{
    throw new System.ArgumentException("angle must be between 0 and 180", "original");
}

TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber();

textFragmentAbsorber.TextReplaceOptions.ReplaceAdjustmentAction = TextReplaceOptions.ReplaceAdjustment.None;

document.Pages.Accept(textFragmentAbsorber);

TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

foreach (TextFragment tf in textFragmentCollection)
{
    if (tf.TextState.Rotation >= ssangle || tf.TextState.Rotation <= -ssangle)
    {
        ssResultMessage = ssResultMessage + "Text: [" + tf.Text + "] Rotation: [" + tf.TextState.Rotation + "] ReplaceAdjustment: [" + textFragmentAbsorber.TextReplaceOptions.ReplaceAdjustmentAction + "]";
                            
        tf.Text = "";                           
    }
}

I cannot provide the PDF files for privacy reasons, but what happens is that when a diagonal text that starts at the left of a value is removed, moves the value to the left taking it out of position.

Before Text = “”:
Unallocated Capital Start of diagonal text Value1

After Text = “”:
Unallocated Capital Value1

@ndias

Thank you for contacting support.

Please note that forum attachments are accessible to topic owner and Aspose staff only. Moreover, you can also edit very first post in this topic and make it a ‘Private Topic’. This way only you and our staff will be able to access this thread. Furthermore, you may also create a sample PDF document which reproduces this issue.

So we need a source PDF file and SSCCE code so that we may try to reproduce it in our environment and help you out. Before sharing requested data, please ensure using Aspose.PDF for .NET 19.7.