mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
Updated Document Layout Analysis (markdown)
@@ -177,12 +177,23 @@ using (var document = PdfDocument.Open(“document.pdf”))
|
||||
foreach (var block in blocks)
|
||||
{
|
||||
// Do something
|
||||
// E.g. Output the blocks
|
||||
foreach (TextLine line in block.TextLines)
|
||||
{
|
||||
foreach (Word word in line.Words)
|
||||
{
|
||||
Console.Write(word.Text + " ");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### Advanced cases
|
||||
|
||||
The method can be tailored by providing a __minimum block width__, and __horizontal and vertical gap sizes/functions__:
|
||||
|
||||
- Minimum block width is set to 1/3 of page width:
|
||||
|
||||
Reference in New Issue
Block a user