mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Correctly clip the text in the text layer (fixes #16316)
This commit is contained in:
parent
f1b005d7b8
commit
19ca41896e
4 changed files with 41 additions and 11 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -586,3 +586,4 @@
|
|||
!issue16224.pdf
|
||||
!issue16278.pdf
|
||||
!copy_paste_ligatures.pdf
|
||||
!issue16316.pdf
|
||||
|
|
BIN
test/pdfs/issue16316.pdf
Executable file
BIN
test/pdfs/issue16316.pdf
Executable file
Binary file not shown.
|
@ -2668,6 +2668,20 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets text content with a specific view box", async function () {
|
||||
const loadingTask = getDocument(buildGetDocumentParams("issue16316.pdf"));
|
||||
const pdfDoc = await loadingTask.promise;
|
||||
const pdfPage = await pdfDoc.getPage(1);
|
||||
const { items } = await pdfPage.getTextContent({
|
||||
disableNormalization: true,
|
||||
});
|
||||
const text = mergeText(items);
|
||||
|
||||
expect(text).toEqual("Experimentation,");
|
||||
|
||||
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