Merged in feature/inlinetable (pull request #148)

Table Aligned Example

* tablealigned
This commit is contained in:
Michael McGuinness
2025-05-21 18:19:19 +00:00
parent e23ada9a8e
commit 9ee97d0c63
4 changed files with 14605 additions and 0 deletions
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
Start of Page No. = 1
Table 1A This is the First Table
Here's another Line
And a Third
-------Table Start--------
[["Name","Favorite Color","Nickname","Idk","I'm gonna put gibberish in here"],["Abc","Def","Ghi","Jkl","Mno"],["Cde","Fgh","ldk","Abb","Acd"],["One","Two","Three","Four","Five"]]
-------Table End--------
Table 2A This is the Second Table
Here's another Line But there won't be a third
-------Table Start--------
[["Name","Favorite Color","Nickname","Idk","I'm gonna put gibberish in here"],["Abc1","Defl","Ghil","Jkl1","Mno1"],["Cdel","Fgh1","Idk1","Abb1","Acd1"],["One1","Two1","Three1","Four1","Fivel"]]
-------Table End--------
File diff suppressed because it is too large Load Diff
@@ -142,6 +142,25 @@ func TestGetDocumentText(t *testing.T) {
assertReaders(t, txtFile, text)
})
t.Run("table_aligned", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
cfg: &cfg,
}
mockTextract := textractmock.NewMockTextractClient(t)
cfg.TextractClient = mockTextract
textractBaseOut, pdf, txtFile, close := getFiles(t, "table_aligned")
defer close()
textExpectations(t, ctx, mockTextract, pdf, textractBaseOut)
text, err := svc.getDocumentText(ctx, pdf)
require.NoError(t, err)
assertReaders(t, txtFile, text)
})
t.Run("cnc_01-06", func(t *testing.T) {
t.Parallel()