TextAbsorber.Visit
Contents
[
Hide
]Visit(Page)
Extracts text on the specified page
public virtual void Visit(Page page)
Parameter | Type | Description |
---|---|---|
page | Page | Pdf pocument page object. |
Examples
The example demonstrates how to extract text on the first PDF document page.
// open document
Document doc = new Document(inFile);
// create TextAbsorber object to extract text
TextAbsorber absorber = new TextAbsorber();
// accept the absorber for all document's pages
absorber.Visit(doc.Pages[1]);
// get the extracted text
string extractedText = absorber.Text;
See Also
- class Page
- class TextAbsorber
- namespace Aspose.Pdf.Text
- assembly Aspose.PDF
Visit(XForm)
Extracts text on the specified XForm.
public virtual void Visit(XForm form)
Parameter | Type | Description |
---|---|---|
form | XForm | Pdf form object. |
Examples
The example demonstrates how to extract text on the first PDF document page.
// open document
Document doc = new Document(inFile);
// create TextAbsorber object to extract text
TextAbsorber absorber = new TextAbsorber();
// accept the absorber for all document's pages
absorber.Visit(doc.Pages[1].Resources.Forms["Xform1"]);
// get the extracted text
string extractedText = absorber.Text;
See Also
- class XForm
- class TextAbsorber
- namespace Aspose.Pdf.Text
- assembly Aspose.PDF
Visit(Document)
Extracts text on the specified document
public virtual void Visit(Document pdf)
Parameter | Type | Description |
---|---|---|
Document | Pdf pocument object. |
Examples
The example demonstrates how to extract text on PDF document.
// open document
Document doc = new Document(inFile);
// create TextAbsorber object to extract text
TextAbsorber absorber = new TextAbsorber();
// accept the absorber for all document's pages
absorber.Visit(doc);
// get the extracted text
string extractedText = absorber.Text;
See Also
- class Document
- class TextAbsorber
- namespace Aspose.Pdf.Text
- assembly Aspose.PDF