Hello,
We are currently trying to extract text from a TextStamp
we added onto a document earlier on.
I found a site in the docs that explains how to achieve this: Extract Text From Stamps using C#|Aspose.PDF for .NET
However, the Annotations
property on the affected page does not contain the stamp that was added. If the Document
is saved to the file system, we can see that it actually contains the stamp (see image).
image.png (6.2 KB)
This simple test to verify the annotations currently fails:
[Fact]
public void InsertTextShape()
{
// arrange
var doc = new Document();
var page = doc.Pages.Add();
var textStamp = new TextStamp("Hello World!");
// act
page.AddStamp(textStamp);
doc.Save();
// assert
page.Annotations.Should().NotBeEmpty("stamps should be readable through annotations");
}
We use Aspose.PDF
in version 22.9.0
.
Did we misunderstand the way that TextStamps
can be extracted from a PDF document or are we doing something wrong?