1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Enable XFA by default in the viewer, and components/ examples (issue 13968)

Given that https://bugzilla.mozilla.org/show_bug.cgi?id=1727396 has now landed, it should now be OK to make this change.
This commit is contained in:
Jonas Jenwald 2021-09-08 12:33:59 +02:00
parent 064c21d360
commit 7498b97aaa
6 changed files with 25 additions and 12 deletions

View file

@ -32,9 +32,11 @@ const CMAP_PACKED = true;
const DEFAULT_URL = "../../web/compressed.tracemonkey-pldi-09.pdf";
// To test the AcroForm and/or scripting functionality, try e.g. this file:
// var DEFAULT_URL = "../../test/pdfs/160F-2019.pdf";
// "../../test/pdfs/160F-2019.pdf"
const ENABLE_XFA = true;
const SEARCH_FOR = ""; // try "Mozilla";
const SEARCH_FOR = ""; // try 'Mozilla';
const SANDBOX_BUNDLE_SRC = "../../node_modules/pdfjs-dist/build/pdf.sandbox.js";
const container = document.getElementById("viewerContainer");
@ -84,6 +86,7 @@ const loadingTask = pdfjsLib.getDocument({
url: DEFAULT_URL,
cMapUrl: CMAP_URL,
cMapPacked: CMAP_PACKED,
enableXfa: ENABLE_XFA,
});
loadingTask.promise.then(function (pdfDocument) {
// Document loaded, specifying document for the viewer and