Hello. I have a pdf-documents with redactions, how i can get marked text?
Hi Ilya,
Nayyer,
Hi Nick,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Nick Miller:
Yes, at the moment Aspose.Pdf for .NET does not provide the feature to specifically extract text ‘marked for redaction’. I have created a new feature request in our issue tracking system with issue id: PDFNEWNET-34521 for our development team to further analyze the issue. They will check if this can be supported in future.
Sorry for the inconvenience,
Hi,
Hi Nick,
Hi Nick,
Document pdfDocument = new Document(inputFile);<o:p></o:p>
StringBuilder builder = new StringBuilder();
foreach (Page page in pdfDocument.Pages)
{
foreach (Aspose.Pdf.InteractiveFeatures.Annotations.Annotation annotation in page.Annotations)
{
if (annotation is PopupAnnotation)
continue;
Aspose.Pdf.Rectangle rect = annotation.Rect;
TextAbsorber absorber = new TextAbsorber();
absorber.TextSearchOptions.Rectangle = rect;
absorber.Visit(page);
builder.Append(absorber.Text);
builder.Append("\r\n\r\n");
}
}
System.IO.File.WriteAllText(outFile, builder.ToString());
Please feel free to contact us for any further assistance.
Best Regards,
The issues you have found earlier (filed as PDFNEWNET-34521) have been fixed in Aspose.Pdf for .NET 10.0.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.