mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
Updated Document Layout Analysis (markdown)
@@ -299,8 +299,8 @@ var blocks = recursiveXYCut.GetBlocks(words);
|
||||
var recursiveXYCut = new RecursiveXYCut(new RecursiveXYCut.RecursiveXYCutOptions()
|
||||
{
|
||||
MinimumWidth = page.Width / 3.0,
|
||||
DominantFontWidthFunc = _ => page.Letters.Average(l => l.GlyphRectangle.Width),
|
||||
DominantFontHeightFunc = _ => page.Letters.Average(l => l.GlyphRectangle.Height)
|
||||
DominantFontWidthFunc = _ => page.Letters.Average(l => l.BoundingBox.Width),
|
||||
DominantFontHeightFunc = _ => page.Letters.Average(l => l.BoundingBox.Height)
|
||||
});
|
||||
|
||||
var blocks = recursiveXYCut.GetBlocks(words);
|
||||
@@ -312,8 +312,8 @@ var blocks = recursiveXYCut.GetBlocks(words);
|
||||
var recursiveXYCut = new RecursiveXYCut(new RecursiveXYCut.RecursiveXYCutOptions()
|
||||
{
|
||||
MinimumWidth = page.Width / 3.0,
|
||||
DominantFontWidthFunc = letters => letters.Select(l => l.GlyphRectangle.Width).Average(),
|
||||
DominantFontHeightFunc = letters => letters.Select(l => l.GlyphRectangle.Height).Average()
|
||||
DominantFontWidthFunc = letters => letters.Select(l => l.BoundingBox.Width).Average(),
|
||||
DominantFontHeightFunc = letters => letters.Select(l => l.BoundingBox.Height).Average()
|
||||
});
|
||||
|
||||
var blocks = recursiveXYCut.GetBlocks(words);
|
||||
|
||||
Reference in New Issue
Block a user