mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Create a new chunk when the char is too rised compared to the previouse one
This commit is contained in:
parent
384bd96165
commit
a96f10e55d
5 changed files with 33 additions and 0 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -581,3 +581,4 @@
|
|||
!issue16063.pdf
|
||||
!issue16067.pdf
|
||||
!bug1820909.1.pdf
|
||||
!issue16221.pdf
|
||||
|
|
BIN
test/pdfs/issue16221.pdf
Executable file
BIN
test/pdfs/issue16221.pdf
Executable file
Binary file not shown.
|
@ -7510,5 +7510,12 @@
|
|||
"md5": "f71e89ebe3d6e75e0c83ce41cd72df1f",
|
||||
"link": true,
|
||||
"type": "other"
|
||||
},
|
||||
{
|
||||
"id": "issue16221-text",
|
||||
"file": "pdfs/issue16221.pdf",
|
||||
"md5": "62d93c9b3aa4ba3af5446504632e78a5",
|
||||
"rounds": 1,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -2624,6 +2624,17 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets text content with a rised text", async function () {
|
||||
const loadingTask = getDocument(buildGetDocumentParams("issue16221.pdf"));
|
||||
const pdfDoc = await loadingTask.promise;
|
||||
const pdfPage = await pdfDoc.getPage(1);
|
||||
const { items } = await pdfPage.getTextContent();
|
||||
|
||||
expect(items.map(i => i.str)).toEqual(["Hello ", "World"]);
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets empty structure tree", async function () {
|
||||
const tree = await page.getStructTree();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue