From ffd4bc790c5fb2c43caed9420f08893cf442199a Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 23 Dec 2020 18:57:44 +0100 Subject: [PATCH] JS -- Add tests for print/save actions * change PDFDocument::hasJSActions to return true when there are JS actions in catalog. --- src/core/document.js | 9 +- test/integration/scripting_spec.js | 81 ++++++ test/pdfs/.gitignore | 2 +- test/pdfs/doc_actions.pdf | Bin 0 -> 8752 bytes test/pdfs/docactions.pdf | 426 ----------------------------- test/test.js | 33 ++- test/test_manifest.json | 12 +- test/unit/api_spec.js | 34 ++- 8 files changed, 144 insertions(+), 453 deletions(-) create mode 100644 test/pdfs/doc_actions.pdf delete mode 100644 test/pdfs/docactions.pdf diff --git a/src/core/document.js b/src/core/document.js index 57167a894..439256d83 100644 --- a/src/core/document.js +++ b/src/core/document.js @@ -1038,10 +1038,11 @@ class PDFDocument { "hasJSActions", this.fieldObjects.then(fieldObjects => { return ( - fieldObjects !== null && - Object.values(fieldObjects).some(fieldObject => - fieldObject.some(object => object.actions !== null) - ) + (fieldObjects !== null && + Object.values(fieldObjects).some(fieldObject => + fieldObject.some(object => object.actions !== null) + )) || + !!this.catalog.jsActions ); }) ); diff --git a/test/integration/scripting_spec.js b/test/integration/scripting_spec.js index 923c7dded..8e5796945 100644 --- a/test/integration/scripting_spec.js +++ b/test/integration/scripting_spec.js @@ -16,6 +16,15 @@ const { clearInput, closePages, loadAndWait } = require("./test_utils.js"); describe("Interaction", () => { + async function actAndWaitForInput(page, selector, action) { + await clearInput(page, selector); + await action(); + await page.waitForFunction( + `document.querySelector("${selector.replace("\\", "\\\\")}").value !== ""` + ); + return page.$eval(selector, el => el.value); + } + describe("in 160F-2019.pdf", () => { let pages; @@ -280,4 +289,76 @@ describe("Interaction", () => { ); }); }); + + describe("in doc_actions.pdf for printing", () => { + let pages; + + beforeAll(async () => { + pages = await loadAndWait("doc_actions.pdf", "#\\34 7R"); + }); + + afterAll(async () => { + await closePages(pages); + }); + + it("must execute WillPrint and DidPrint actions", async () => { + await Promise.all( + pages.map(async ([browserName, page]) => { + if (process.platform === "win32" && browserName === "firefox") { + // Doesn't work because of bug 1662471 + return; + } + let text = await actAndWaitForInput(page, "#\\34 7R", async () => { + await page.click("#print"); + }); + expect(text).withContext(`In ${browserName}`).toEqual("WillPrint"); + + await page.waitForFunction( + `document.querySelector("#\\\\35 0R").value !== ""` + ); + + text = await page.$eval("#\\35 0R", el => el.value); + expect(text).withContext(`In ${browserName}`).toEqual("DidPrint"); + }) + ); + }); + }); + + describe("in doc_actions.pdf for saving", () => { + let pages; + + beforeAll(async () => { + pages = await loadAndWait("doc_actions.pdf", "#\\34 7R"); + }); + + afterAll(async () => { + await closePages(pages); + }); + + it("must execute WillSave and DidSave actions", async () => { + await Promise.all( + pages.map(async ([browserName, page]) => { + try { + // Disable download in chrome + // (it leads to an error in firefox so the try...) + await page._client.send("Page.setDownloadBehavior", { + behavior: "deny", + }); + } catch (_) {} + await clearInput(page, "#\\34 7R"); + let text = await actAndWaitForInput(page, "#\\34 7R", async () => { + await page.click("#download"); + }); + expect(text).withContext(`In ${browserName}`).toEqual("WillSave"); + + await page.waitForFunction( + `document.querySelector("#\\\\35 0R").value !== ""` + ); + + text = await page.$eval("#\\35 0R", el => el.value); + expect(text).withContext(`In ${browserName}`).toEqual("DidSave"); + }) + ); + }); + }); }); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 8d5894dee..b81f2b0f6 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -46,6 +46,7 @@ !issue7544.pdf !issue7507.pdf !issue6931_reduced.pdf +!doc_actions.pdf !issue7580.pdf !issue7598.pdf !issue12750.pdf @@ -179,7 +180,6 @@ !pattern_text_embedded_font.pdf !devicen.pdf !cmykjpeg.pdf -!docactions.pdf !issue840.pdf !160F-2019.pdf !issue4402_reduced.pdf diff --git a/test/pdfs/doc_actions.pdf b/test/pdfs/doc_actions.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bcc3ed923f4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oLy%ZY~XqowuDk zme)U%NWDwiv1{iEW=Q(F^K^w_eV#pDyS%P=$BOG0fAecU=>fC*1Fn)$GA_({JHiw? zPyArVlFc24OXsI;V1bZZm4h{cQ*){>e!At`W6$dbF8eX+(YWB|FKV{(FHBfiIbqYV zQG$Moyq={sk0NxgF3Dg}O4`cJtaCf$$K-S3M-RGie$o)CjvT(UbzGubN-hLg_ zr-vB(EOSc<_Bj5B!sA0x&g4rUjdvRLb5Ovu=XDpJei+@P#oWFQlZt+;PGp4Vj97M1 zc&mr*;=IkFCk6%VEcV&<*|MTFo0ct}*83oKe)FC$vyn@z7b@9_KGlq*SwW7Z5!~)j z^#6r2`-T|H7rZIKa%{&jeFM@Pun(!1z-pI!4(!8)G@1E0FX(}%~g?g|G)u+wL8oY$(* zLNN}voJt_HmTpzqcwEqODgi8t7(i*A4kXiDvWj#BX;tY6kOJByHvnyf8=zLMGo;hk zP+^0aQtKU(9-HwXG?caqmBUx1Ie;dqq-sF47J}vAZ;M84li#5F_Nv4NO{T*TXxE@9 z$Ht&|$>s}zJQMMMyU1px6@3_kkS(W1GypQ-FNG%?1cnm?hrlr&DGbE$0T>nlP^lRB z+ev$LyYOxVAmN7`(C(qKXc!Y69u$AAVL)s&W{?auLcRcMg?wDV7V!9h5D3`t@CWco zl8wQl5JZ~-2~dSjn+{KU;7besv^t5yMl2$zRk#IE5BGoZ65bTY(E!4OPdac5s<35C z$6Mm!wj2%9aamsifZZA?1> -stream -2 0 3 33 4 227 5 301 6 1602 7 1672 8 1755 9 1808 10 1936 11 1990 12 2115 13 2169 14 2464 15 2517 16 2561 17 2606 18 2730 19 2824 20 2877 21 3110 22 3155 23 3208 24 3441 25 3486 26 3539 27 3772 28 3817 29 3870 30 4103 31 4148 32 4201 33 4434 34 4479 35 4532 36 4765 37 4810 38 4905 39 4958 40 5191 41 5236 42 5289 43 5522 44 5567 45 5620 46 5855 47 5900 48 5953 49 6188 50 6233 51 6286 52 6521 53 6566 54 6599 55 6652 56 6887 57 6932 58 6992 59 7107 60 7703 61 7927 62 7935 63 8215 64 8430 65 8632 66 8692 67 8846 68 8989 69 9068 70 9138 71 9177 -<< /D [ 3 0 R /Fit ] /S /GoTo >> -<< /AA << /O << /JS (console.println\('Open the document'\); ) /S /JavaScript >> >> /Annots [ 13 0 R ] /Contents 73 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 14 0 R /Type /Page >> -<< /JS (console.println('Open Action');) /S /JavaScript >> -<< /Differences [ 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde 39 /quotesingle 96 /grave 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron 164 /currency 166 /brokenbar 168 /dieresis /copyright /ordfeminine 172 /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu 183 /periodcentered /cedilla /onesuperior /ordmasculine 188 /onequarter /onehalf /threequarters 192 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] /Type /Encoding >> -<< /BaseFont /ZapfDingbats /Name /ZaDb /Subtype /Type1 /Type /Font >> -<< /BaseFont /Helvetica /Encoding 5 0 R /Name /Helv /Subtype /Type1 /Type /Font >> -<< /Font << /F30 9 0 R >> /ProcSet [ /PDF /Text ] >> -<< /BaseFont /GCRMMP+Dingbats /FirstChar 123 /FontDescriptor 64 0 R /LastChar 123 /Subtype /Type1 /Type /Font /Widths 61 0 R >> -<< /Font << /F31 11 0 R >> /ProcSet [ /PDF /Text ] >> -<< /BaseFont /XYLNGW+CMSS10 /FirstChar 80 /FontDescriptor 63 0 R /LastChar 117 /Subtype /Type1 /Type /Font /Widths 60 0 R >> -<< /Font << /F31 11 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /F << /JS (console.println\('text entered='+event.value\);) /S /JavaScript >> >> /BS << /S /S /W 1 >> /DA (/Helv 10 Tf 0 0 0 rg) /DV () /F 4 /FT /Tx /MK << /BC [ 1 0 0 ] /BG [ 1 1 1 ] >> /Q 0 /Rect [ 184.744 652.309 271.776 668.194 ] /Subtype /Widget /T (field1) /Type /Annot /V () >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /D [ 3 0 R /XYZ 105.869 705.06 null ] >> -<< /D [ 3 0 R /XYZ 106.869 667.198 null ] >> -<< /BaseFont /CFMZGO+CMR10 /FirstChar 12 /FontDescriptor 62 0 R /LastChar 121 /Subtype /Type1 /Type /Font /Widths 59 0 R >> -<< /Count 6 /Kids [ 3 0 R 20 0 R 23 0 R 26 0 R 29 0 R 32 0 R ] /Parent 65 0 R /Type /Pages >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 2'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 2'\);) /S /JavaScript >> >> /Contents 74 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 19 0 R /Type /Page >> -<< /D [ 20 0 R /XYZ 159.667 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 3'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 3'\);) /S /JavaScript >> >> /Contents 75 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 22 0 R /Type /Page >> -<< /D [ 23 0 R /XYZ 105.869 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 4'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 4'\);) /S /JavaScript >> >> /Contents 76 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 25 0 R /Type /Page >> -<< /D [ 26 0 R /XYZ 159.667 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 5'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 5'\);) /S /JavaScript >> >> /Contents 77 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 28 0 R /Type /Page >> -<< /D [ 29 0 R /XYZ 105.869 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 6'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 6'\);) /S /JavaScript >> >> /Contents 78 0 R /MediaBox [ 0 0 612 792 ] /Parent 18 0 R /Resources 31 0 R /Type /Page >> -<< /D [ 32 0 R /XYZ 159.667 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 7'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 7'\);) /S /JavaScript >> >> /Contents 79 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 34 0 R /Type /Page >> -<< /D [ 35 0 R /XYZ 105.869 705.06 null ] >> -<< /Count 6 /Kids [ 35 0 R 39 0 R 42 0 R 45 0 R 48 0 R 51 0 R ] /Parent 65 0 R /Type /Pages >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 8'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 8'\);) /S /JavaScript >> >> /Contents 80 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 38 0 R /Type /Page >> -<< /D [ 39 0 R /XYZ 159.667 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 9'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 9'\);) /S /JavaScript >> >> /Contents 81 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 41 0 R /Type /Page >> -<< /D [ 42 0 R /XYZ 105.869 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 10'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 10'\);) /S /JavaScript >> >> /Contents 82 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 44 0 R /Type /Page >> -<< /D [ 45 0 R /XYZ 159.667 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 11'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 11'\);) /S /JavaScript >> >> /Contents 83 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 47 0 R /Type /Page >> -<< /D [ 48 0 R /XYZ 105.869 705.06 null ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 12'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 12'\);) /S /JavaScript >> >> /Contents 84 0 R /MediaBox [ 0 0 612 792 ] /Parent 37 0 R /Resources 50 0 R /Type /Page >> -<< /D [ 51 0 R /XYZ 159.667 705.06 null ] >> -<< /Names [ (Open) 4 0 R ] >> -<< /Font << /F8 17 0 R >> /ProcSet [ /PDF /Text ] >> -<< /AA << /C << /JS (console.println\('Close page 13'\);) /S /JavaScript >> /O << /JS (console.println\('Open page 13'\);) /S /JavaScript >> >> /Contents 85 0 R /MediaBox [ 0 0 612 792 ] /Parent 57 0 R /Resources 54 0 R /Type /Page >> -<< /D [ 55 0 R /XYZ 105.869 705.06 null ] >> -<< /Count 1 /Kids [ 55 0 R ] /Parent 65 0 R /Type /Pages >> -<< /DA (/Helv 10 Tf 0 g) /DR << /Font << /Helv 7 0 R /ZaDb 6 0 R >> >> /Fields [ 13 0 R ] /NeedAppearances true >> -[ 555.6 555.6 833.3 833.3 277.8 305.6 500 500 500 500 500 750 444.4 500 722.2 777.8 500 902.8 1013.9 777.8 277.8 277.8 500 833.3 500 833.3 777.8 277.8 388.9 388.9 500 777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8 833.3 555.6 500 555.6 527.8 391.7 394.4 388.9 555.6 527.8 722.2 527.8 527.8 ] -[ 638.9 736.1 645.8 555.6 680.6 687.5 666.7 944.5 666.7 666.7 611.1 288.9 500 288.9 500 277.8 277.8 480.6 516.7 444.4 516.7 444.4 305.6 500 516.7 238.9 266.7 488.9 238.9 794.4 516.7 500 516.7 516.7 341.7 383.3 361.1 516.7 ] -[ 392 ] -<< /Ascent 694 /CapHeight 683 /CharSet (/M/a/colon/d/e/eight/fi/five/four/g/l/nine/one/p/seven/six/t/three/two/x/y/zero) /Descent -194 /Flags 4 /FontBBox [ -40 -250 1009 750 ] /FontFile 86 0 R /FontName /CFMZGO+CMR10 /ItalicAngle 0 /StemV 69 /Type /FontDescriptor /XHeight 431 >> -<< /Ascent 694 /CapHeight 694 /CharSet (/P/S/b/i/m/t/u) /Descent -194 /Flags 4 /FontBBox [ -61 -250 999 759 ] /FontFile 87 0 R /FontName /XYLNGW+CMSS10 /ItalicAngle 0 /StemV 78 /Type /FontDescriptor /XHeight 444 >> -<< /Ascent 708 /CapHeight 708 /CharSet (/a97) /Descent 0 /Flags 4 /FontBBox [ -1 -143 981 819 ] /FontFile 88 0 R /FontName /GCRMMP+Dingbats /ItalicAngle 0 /StemV 0 /Type /FontDescriptor /XHeight 400 >> -<< /Count 13 /Kids [ 18 0 R 37 0 R 57 0 R ] /Type /Pages >> -<< /Limits [ (Doc-Start) (page.13) ] /Names [ (Doc-Start) 16 0 R (page.1) 15 0 R (page.10) 46 0 R (page.11) 49 0 R (page.12) 52 0 R (page.13) 56 0 R ] >> -<< /Limits [ (page.2) (page.7) ] /Names [ (page.2) 21 0 R (page.3) 24 0 R (page.4) 27 0 R (page.5) 30 0 R (page.6) 33 0 R (page.7) 36 0 R ] >> -<< /Limits [ (page.8) (page.9) ] /Names [ (page.8) 40 0 R (page.9) 43 0 R ] >> -<< /Kids [ 66 0 R 67 0 R 68 0 R ] /Limits [ (Doc-Start) (page.9) ] >> -<< /Dests 69 0 R /JavaScript 53 0 R >> -<< /AA << >> /AcroForm 58 0 R /Names 70 0 R /OpenAction 2 0 R /PageMode /UseOutlines /Pages 65 0 R /Type /Catalog >> -endstream -endobj -72 0 obj -<< /Author () /CreationDate (D:20201207183605+01'00') /Creator (LaTeX with hyperref) /Keywords () /ModDate (D:20201207183605+01'00') /PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.21 \(TeX Live 2020/Debian\) kpathsea version 6.3.2) /Producer (pdfTeX-1.40.21) /Subject () /Title () /Trapped /False >> -endobj -73 0 obj -<< /Length 100 >> -stream -BT -/F8 9.9626 Tf 121.813 655.243 Td [(My)-333(text)-334(\014eld:)]TJ 154.421 -565.878 Td [(1)]TJ -ET -endstream -endobj -74 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(2)]TJ 154.421 -567.87 Td [(2)]TJ -ET -endstream -endobj -75 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(3)]TJ 154.421 -567.87 Td [(3)]TJ -ET -endstream -endobj -76 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(4)]TJ 154.421 -567.87 Td [(4)]TJ -ET -endstream -endobj -77 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(5)]TJ 154.421 -567.87 Td [(5)]TJ -ET -endstream -endobj -78 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(6)]TJ 154.421 -567.87 Td [(6)]TJ -ET -endstream -endobj -79 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(7)]TJ 154.421 -567.87 Td [(7)]TJ -ET -endstream -endobj -80 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(8)]TJ 154.421 -567.87 Td [(8)]TJ -ET -endstream -endobj -81 0 obj -<< /Length 84 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(9)]TJ 154.421 -567.87 Td [(9)]TJ -ET -endstream -endobj -82 0 obj -<< /Length 86 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(10)]TJ 151.931 -567.87 Td [(10)]TJ -ET -endstream -endobj -83 0 obj -<< /Length 85 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(11)]TJ 151.93 -567.87 Td [(11)]TJ -ET -endstream -endobj -84 0 obj -<< /Length 86 >> -stream -BT -/F8 9.9626 Tf 175.611 657.235 Td [(page)-333(12)]TJ 151.931 -567.87 Td [(12)]TJ -ET -endstream -endobj -85 0 obj -<< /Length 85 >> -stream -BT -/F8 9.9626 Tf 121.813 657.235 Td [(page)-333(13)]TJ 151.93 -567.87 Td [(13)]TJ -ET -endstream -endobj -86 0 obj -<< /Length1 1700 /Length2 12121 /Length3 0 /Length 13821 >> -stream -%!PS-AdobeFont-1.0: CMR10 003.002 -%%Title: CMR10 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMR10. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup -/UniqueID get 5000793 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /CFMZGO+CMR10 def -/FontBBox {-40 -250 1009 750 }readonly def -/PaintType 0 def -/FontInfo 9 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR10.) readonly def -/FullName (CMR10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 77 /M put -dup 97 /a put -dup 58 /colon put -dup 100 /d put -dup 101 /e put -dup 56 /eight put -dup 12 /fi put -dup 53 /five put -dup 52 /four put -dup 103 /g put -dup 108 /l put -dup 57 /nine put -dup 49 /one put -dup 112 /p put -dup 55 /seven put -dup 54 /six put -dup 116 /t put -dup 51 /three put -dup 50 /two put -dup 120 /x put -dup 121 /y put -dup 48 /zero put -readonly def -currentdict end -currentfile eexec -oc;jAw-=%W)-{ru)rAE(@{빴Q|_R -ϤA -T@|q|VkJ%qu8PwGxŪ̆Q6K -U\%b"t-*xJ+ -}3{Z2zݬT2s$Z&{BJ{x< ,-.2iRnñvپ1䠕 '䓱_r"O_t3kefB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bۜNpqORQc:0"M9~Zn>Xu2VaŭgBZ -?xlcۛ%1\DQx{EGWνmG&^v.׊Hsl, -'hAm;npk&V:z5ǥ (H9ًQ_]CLς/"+n CϣkSfa sVlt«@GJya`mx_1U6T}b2B[|2@ԣ -퐮@˯_ yoLRF( KTO@kH~v`{᲌T*_%ݑ>dx)vȖLϙĪw>Y/1?,.5+[F sBӻh~-)RgC[*fLм&Z;pf^_gxFo!Bu!XW"]ktے_ -b?ݕ^E0|eٙeiz}Jܶ:" PP+}:fN`H٭P -rA~rhhDJV{#"B=b;N}!OT<>Ѩ=M`\uGׁfvjƴ\ }3-U䘤Ai˘;q ;mL5c$\KF8K'u &1i3 c_pJ M&$baTf${&d +p{RQ.ȉM:? S#b [μF*n! r$;:|Dta_IҕŠFܯׄ-g]ιo4aXmwtg>^Q&)FzxRݮe{fcY%DWHf)x5.ψl -a7Vfuwz n hӉ_Y\9}2Z~Iq<藇HA|7.dc z-=53S!ɂidj@4LYm -ͯGLxXUkKu6e.o9 CƅADמRAB>s 1HZQ2+T Ɗ>[$YMSV7iuv@^:,YZյJf!9dSjQu:}^4/鴴XJt u$VE \Ό$%Я -n'C86U}) Jy> -stream -%!PS-AdobeFont-1.0: CMSS10 003.002 -%%Title: CMSS10 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMSS10. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMSS10 known{/CMSS10 findfont dup/UniqueID known{dup -/UniqueID get 5000803 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /XYLNGW+CMSS10 def -/FontBBox {-61 -250 999 759 }readonly def -/PaintType 0 def -/FontInfo 9 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSS10.) readonly def -/FullName (CMSS10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 80 /P put -dup 83 /S put -dup 98 /b put -dup 105 /i put -dup 109 /m put -dup 116 /t put -dup 117 /u put -readonly def -currentdict end -currentfile eexec -oc;jAw-ᾉYň5t&נ{hLGqB`d˗Pة|*x\ޖHtEB-gedog7Q`[['W73sZ9 m !tAY!$tY\r[uTIUiBy[Ȝŗ3Kï6zJ!˒Js&B5C3 }bQQvcXVL8:oF)w=b.0ٺ;4'Sb|2FZ0f瑆*5"{ Eޗ|&z{7j俶CCm$CfWM&9WEC7 鶐5Qs A0WX a4f36 D8ꩡx9Et{ -u|p:1cz5^Hɀ2bx@_@z gނ]0&, bܼR" a["+)騰% &8| 4O'ؘͣч)9$gꡉginkvRc-gj -x4cVԈ}pA)%`+e;1wXlfcL!9LO_ceph\CLjO)hyr+q-Ei|DcYv -+wud[!}QnMu9;jJk*d:4SklsҞ}4 nvF&VY8jzw?0}%tT%;p2QAWKq76jf?D*6zem>;LjI]f`^:Q&>NS\GYV,8a$l0 -L{8gX[rt=@|sv\a 伟bWMVSvn^hUC<-ެHO?OtRpDo^bh;O}M_Ɵz6XF_J}:Y!f,S%9oZKSp /88OO:?*\UV/vy0Ogƺj -AERpޫkJc~S㢕A_.!qk:2P g' -`eҞwkqjCY?^iĊXA*s)kc9ځ;Kq9g5>?Ӗt^g72xr ?n2<5(_ ]w.Js @e'if<_70Ai b۳n]9>PdBJk,~[#A3n \hyYS:/#a8'<>0FgKJ|2lig>:`~p޳>qCyl7`zN~]}lT!I\Eq -0!B)B߮ox!‹+,% mƖ"NYeh6^.̨~A 4h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copyright URW Software, Copyright 1997 by URW -% URW Software, Copyright 1997 by URW -% See the file COPYING (GNU General Public License) for license conditions. -% As a special exception, permission is granted to include this font -% program in a Postscript or PDF file that consists of a document that -% contains text to be displayed or printed using this font, regardless -% of the conditions or license applying to the document itself. -12 dict begin -/FontInfo 10 dict dup begin -/version (001.005) readonly def -/Notice (URW Software, Copyright 1997 by URW. See the file COPYING (GNU General Public License) for license conditions. As a special exception, permission is granted to include this font program in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself.) readonly def -/Copyright (Copyright URW Software, Copyright 1997 by URW) readonly def -/FullName (Dingbats ) readonly def -/FamilyName (Dingbats) readonly def -/Weight (Regular) readonly def -/ItalicAngle 0.0 def -/isFixedPitch false def -/UnderlinePosition -72 def -/UnderlineThickness 36 def -end readonly def -/FontName /GCRMMP+Dingbats def -/PaintType 0 def -/WMode 0 def -/FontBBox {-1 -143 981 819} readonly def -/FontType 1 def -/FontMatrix [0.001 0.0 0.0 0.001 0.0 0.0] readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 123 /a97 put -readonly def -currentdict end -currentfile eexec -oc;jtD[1ƅpTo9`.:ypJ*l'e}#)&7+/^ W{LZ60VQR^λ3r)#v$p~c&'ſ+ %;a~!ty`r|v0Q>(Ŧ^bW69u ߈PuJ{{<\C>LC6ojL~c'YWU XMkA.cE}+:dkGvH8rSOp,<jy52|7Ile7d5+xMT),ҍ:ރsź'(tUU(j)^&pN -ޚraQjnHQ%d.Ȑ"8՚ϸa};{&;֖42- jxg;R:;*鮐߾jF 1Y;[IqkcCtpSL~r~U`Lz}y@^6df!pN %{Ȁ*f4c궻dB#~\55x!C5u_k1(qފ`;2j+{4K ~:@rCn`sH[دP:I#aH^u#<.}ʬ< mlQbB -*=(bCʻMku^ӁK n`f.߶0? D5\њSN6?Yy 0<8b{kihkĭ636]чFK=t_e?AR%ӐE֧\˸*?2]G -tendstream -endobj -89 0 obj -<< /Type /XRef /Length 360 /W [ 1 2 1 ] /Info 72 0 R /Root 71 0 R /Size 90 /ID [<4ebbbcf81067ebcf0d2f90a6d284c12c>] >> -stream -  -    !"#$%&'()*+,-./0123456789:;<=>?@ABCDE&(()8)*D*+P+,\,-j-.y/eZ3t -endstream -endobj -startxref -36980 -%%EOF diff --git a/test/test.js b/test/test.js index 63e2a5be5..374fddf35 100644 --- a/test/test.js +++ b/test/test.js @@ -836,15 +836,36 @@ async function startBrowser(browserName, startUrl = "") { ignoreDefaultArgs: ["--disable-extensions"], }; + if (!tempDir) { + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "pdfjs-")); + } + const printFile = path.join(tempDir, "print.pdf"); + if (browserName === "chrome") { // avoid crash options.args = ["--no-sandbox", "--disable-setuid-sandbox"]; + // silent printing in a pdf + options.args.push("--kiosk-printing"); } if (browserName === "firefox") { options.extraPrefsFirefox = { // avoid to have a prompt when leaving a page with a form "dom.disable_beforeunload": true, + // Disable dialog when saving a pdf + "pdfjs.disabled": true, + "browser.helperApps.neverAsk.saveToDisk": "application/pdf", + // Avoid popup when saving is done + "browser.download.panel.shown": true, + // Save file in output + "browser.download.folderList": 2, + "browser.download.dir": tempDir, + // Print silently in a pdf + "print.always_print_silent": true, + "print.show_print_progress": false, + print_printer: "PDF", + "print.printer_PDF.print_to_file": true, + "print.printer_PDF.print_to_filename": printFile, }; } @@ -928,8 +949,15 @@ async function closeSession(browser) { const allClosed = sessions.every(function (s) { return s.closed; }); - if (allClosed && onAllSessionsClosed) { - onAllSessionsClosed(); + if (allClosed) { + if (tempDir) { + const rimraf = require("rimraf"); + rimraf.sync(tempDir); + } + + if (onAllSessionsClosed) { + onAllSessionsClosed(); + } } } } @@ -984,5 +1012,6 @@ var onAllSessionsClosed; var host = "127.0.0.1"; var options = parseOptions(); var stats; +var tempDir = null; main(); diff --git a/test/test_manifest.json b/test/test_manifest.json index 2996c1b41..f5c1b0d5d 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -894,12 +894,6 @@ "link": false, "type": "eq" }, - { "id": "docactions", - "file": "pdfs/docactions.pdf", - "md5": "28ea940349cf7cb793cfe167d04b097c", - "rounds": 1, - "type": "eq" - }, { "id": "issue9084", "file": "pdfs/issue9084.pdf", "md5": "5570ec01cc869d299fec1b2f68926a08", @@ -1450,6 +1444,12 @@ "type": "eq", "about": "Type3 fonts with image resources; both pages need to be tested, otherwise the bug won't manifest." }, + { "id": "doc_actions", + "file": "pdfs/doc_actions.pdf", + "md5": "ceae4eb405a0b40394f4d63d7525a870", + "rounds": 1, + "type": "eq" + }, { "id": "issue12504", "file": "pdfs/issue12504.pdf", "md5": "04fcc87f3e7e9e925e3ef83cf0bf49f4", diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js index 82e3b1034..5cb6dbc54 100644 --- a/test/unit/api_spec.js +++ b/test/unit/api_spec.js @@ -1006,27 +1006,33 @@ describe("api", function () { }); it("gets JSActions", function (done) { // PDF document with "JavaScript" action in the OpenAction dictionary. - const loadingTask = getDocument(buildGetDocumentParams("docactions.pdf")); + const loadingTask = getDocument( + buildGetDocumentParams("doc_actions.pdf") + ); const promise = loadingTask.promise.then(async pdfDoc => { const docActions = await pdfDoc.getJSActions(); - const page5 = await pdfDoc.getPage(5); - const page12 = await pdfDoc.getPage(12); - const page5Actions = await page5.getJSActions(); - const page12Actions = await page12.getJSActions(); - return [docActions, page5Actions, page12Actions]; + const page1 = await pdfDoc.getPage(1); + const page3 = await pdfDoc.getPage(3); + const page1Actions = await page1.getJSActions(); + const page3Actions = await page3.getJSActions(); + return [docActions, page1Actions, page3Actions]; }); promise - .then(async ([docActions, page5Actions, page12Actions]) => { + .then(async ([docActions, page1Actions, page3Actions]) => { expect(docActions).toEqual({ - Open: ["console.println('Open Action');"], + DidPrint: [`this.getField("Text2").value = "DidPrint";`], + DidSave: [`this.getField("Text2").value = "DidSave";`], + WillClose: [`this.getField("Text1").value = "WillClose";`], + WillPrint: [`this.getField("Text1").value = "WillPrint";`], + WillSave: [`this.getField("Text1").value = "WillSave";`], }); - expect(page5Actions).toEqual({ - PageOpen: ["console.println('Open page 5');"], - PageClose: ["console.println('Close page 5');"], + expect(page1Actions).toEqual({ + PageOpen: [`this.getField("Text1").value = "PageOpen 1";`], + PageClose: [`this.getField("Text2").value = "PageClose 1";`], }); - expect(page12Actions).toEqual({ - PageOpen: ["console.println('Open page 12');"], - PageClose: ["console.println('Close page 12');"], + expect(page3Actions).toEqual({ + PageOpen: [`this.getField("Text5").value = "PageOpen 3";`], + PageClose: [`this.getField("Text6").value = "PageClose 3";`], }); loadingTask.destroy().then(done); })