TableAbsorber.Visit
Содержание
[
Скрывать
]Visit(Page)
Извлекает таблицы на указанной странице
public virtual void Visit(Page page)
| Параметр | Тип | Описание |
|---|---|---|
| page | Page | Объект страницы PDF документа. |
Примеры
Пример демонстрирует, как извлечь таблицу на первой странице PDF документа.
// Open document
Document doc = new Document(@"D:\Tests\input.pdf");
// Create TableAbsorber object to find tables
TableAbsorber absorber = new TableAbsorber();
// Visit first page with absorber
absorber.Visit(doc.Pages[1]);
// Get access to first table on page, their first cell and text fragments in it
TextFragment fragment = absorber.TableList[0].RowList[0].CellList[0].TextFragments[1];
// Change text of the first text fragment in the cell
fragment.Text = "hi world";
// Save document
doc.Save(@"D:\Tests\output.pdf");
См. также
- класс Page
- класс TableAbsorber
- пространство имен Aspose.Pdf.Text
- сборка Aspose.PDF
Visit(Document)
Извлекает таблицы в указанном документе.
public void Visit(Document pdf)
| Параметр | Тип | Описание |
|---|---|---|
| Document | Объект PDF документа. |
Примеры
Пример демонстрирует, как извлечь таблицу на первой странице PDF документа.
// Open document
Document doc = new Document(@"D:\Tests\input.pdf");
// Create TableAbsorber object to find tables
TableAbsorber absorber = new TableAbsorber();
// Visit first page with absorber
absorber.Visit(doc);
// Get access to first table on page, their first cell and text fragments in it
TextFragment fragment = absorber.TableList[0].RowList[0].CellList[0].TextFragments[1];
// Change text of the first text fragment in the cell
fragment.Text = "hi world";
// Save document
doc.Save(@"D:\Tests\output.pdf");
См. также
- класс Document
- класс TableAbsorber
- пространство имен Aspose.Pdf.Text
- сборка Aspose.PDF