mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Skip any whitespace after the first object in linearized PDFs (issue 17665)
This way the code is now consistent with the non-linearized branch in the `PDFDocument.startXRef` getter.
This commit is contained in:
parent
eb5e6e68d6
commit
37e98e39f6
4 changed files with 30 additions and 1 deletions
|
@ -511,6 +511,18 @@ describe("api", function () {
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("checks the `startxref` position of a linearized pdf doc (issue 17665)", async function () {
|
||||
const loadingTask = getDocument(buildGetDocumentParams("empty.pdf"));
|
||||
expect(loadingTask instanceof PDFDocumentLoadingTask).toEqual(true);
|
||||
|
||||
const pdfDocument = await loadingTask.promise;
|
||||
|
||||
const startXRefPos = await pdfDocument.getStartXRefPos();
|
||||
expect(startXRefPos).toEqual(116);
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("checks that `docId`s are unique and increasing", async function () {
|
||||
const loadingTask1 = getDocument(basicApiGetDocumentParams);
|
||||
expect(loadingTask1 instanceof PDFDocumentLoadingTask).toEqual(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue