mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
#15 change default word extraction for latex test
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -80,6 +80,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The words on this page.</returns>
|
/// <returns>The words on this page.</returns>
|
||||||
public IEnumerable<Word> GetWords() => GetWords(DefaultWordExtractor.Instance);
|
public IEnumerable<Word> GetWords() => GetWords(DefaultWordExtractor.Instance);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use a custom <see cref="IWordExtractor"/> to get the words for this page.
|
/// Use a custom <see cref="IWordExtractor"/> to get the words for this page.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
var gap = letter.Origin.X - (lastLetter.Origin.X + lastLetter.Width);
|
var gap = letter.Origin.X - (lastLetter.Origin.X + lastLetter.Width);
|
||||||
var nextToLeft = letter.Origin.X < lastX.Value - 1;
|
var nextToLeft = letter.Origin.X < lastX.Value - 1;
|
||||||
var nextBigSpace = gap > Math.Max(lastLetter.Width, letter.Width) * 0.9m;
|
var nextBigSpace = gap > Math.Max(lastLetter.GlyphRectangle.Height, letter.GlyphRectangle.Height) * 0.39m;
|
||||||
var nextIsWhiteSpace = string.IsNullOrWhiteSpace(letter.Value);
|
var nextIsWhiteSpace = string.IsNullOrWhiteSpace(letter.Value);
|
||||||
var nextFontDiffers = !string.Equals(letter.FontName, lastLetter.FontName, StringComparison.OrdinalIgnoreCase) && gap > letter.Width * 0.1m;
|
var nextFontDiffers = !string.Equals(letter.FontName, lastLetter.FontName, StringComparison.OrdinalIgnoreCase) && gap > letter.Width * 0.1m;
|
||||||
var nextFontSizeDiffers = Math.Abs(letter.FontSize - lastLetter.FontSize) > 0.1m;
|
var nextFontSizeDiffers = Math.Abs(letter.FontSize - lastLetter.FontSize) > 0.1m;
|
||||||
|
|||||||
Reference in New Issue
Block a user