Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
تتيح لك Aspose.PDF لـ NET استخراج النص من تعليقات الطوابع. لاستخراج النص من تعليقات الطوابع في PDF، يمكن استخدام الخطوات التالية.
Document
.Annotation
المرغوب من قائمة التعليقات في صفحة.TextAbsorber
.يعمل مقتطف الكود التالي أيضًا مع مكتبة Aspose.PDF.Drawing.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ExtractText()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Text();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "ExtractStampText.pdf"))
{
Aspose.Pdf.Annotations.Annotation item = document.Pages[1].Annotations[1];
if (item is Aspose.Pdf.Annotations.StampAnnotation annot)
{
var absorber = new Aspose.Pdf.Text.TextAbsorber();
Aspose.Pdf.XForm appearance = annot.Appearance["N"];
absorber.Visit(appearance);
Console.WriteLine(absorber.Text);
}
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.