TextAbsorber.Visit

Visit(Page)

Extracts text on the specified page

public virtual void Visit(Page page)
ParameterTypeDescription
pagePagePdf 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


Visit(XForm)

Extracts text on the specified XForm.

public virtual void Visit(XForm form)
ParameterTypeDescription
formXFormPdf 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


Visit(Document)

Extracts text on the specified document

public virtual void Visit(Document pdf)
ParameterTypeDescription
pdfDocumentPdf 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