Skip to content

Bump pdfjs-dist from 5.6.205 to 5.7.284#633

Open
ggtlvkma356 wants to merge 1 commit intoGrapheneOS:mainfrom
ggtlvkma356:pdfjs-dist-5.7.284
Open

Bump pdfjs-dist from 5.6.205 to 5.7.284#633
ggtlvkma356 wants to merge 1 commit intoGrapheneOS:mainfrom
ggtlvkma356:pdfjs-dist-5.7.284

Conversation

@ggtlvkma356
Copy link
Copy Markdown
Contributor

@ggtlvkma356 ggtlvkma356 commented Apr 29, 2026

Supersede #632

@inthewaves inthewaves self-assigned this Apr 29, 2026
Copy link
Copy Markdown
Member

@inthewaves inthewaves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our index.js passes isEvalSupported to getDocument:

globalThis.loadDocument = function () {
    const pdfPassword = channel.getPassword();
    const loadingTask = getDocument({
        url: "https://localhost/placeholder.pdf",
        cMapUrl: "https://localhost/viewer/cmaps/",
        cMapPacked: true,
        password: pdfPassword,
        iccUrl: "https://localhost/viewer/iccs/",
        isEvalSupported: false,

However, pdf.js removes isEvalSupported in mozilla/pdf.js@f6bac01 (not an error because of JavaScript permissiveness... thanks JavaScript!). It seems like a legacy option to me, but we should make sure that having it removed is fine

@ggtlvkma356
Copy link
Copy Markdown
Contributor Author

isEvalSupported was disabled to prevent pdf.js from compiling PostScript code inside a pdf. The corresponding switch in the new version is useWasm. I have updated the PR to reflect the change.

@inthewaves
Copy link
Copy Markdown
Member

We'd need to check if useWasm false conflicts with existing wasm usage, e.g. 99736fc

@ggtlvkma356
Copy link
Copy Markdown
Contributor Author

Wasm is currently disabled by CSP, see #634

Copy link
Copy Markdown
Member

@inthewaves inthewaves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useWasm appears to default to true in pdf.js, but it's good that we're specifying useWasm explicitly due to the isEvalSupported change in 5.7.284.

We can manage CSP for workers in another issue/PR; it's a preexisting issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants