Closed Bug 1446148 Opened 8 years ago Closed 6 years ago

Policy: PDF document permissions

Categories

(Firefox :: Enterprise Policies, enhancement, P5)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bdahl, Unassigned)

References

Details

There's now a policy option to disable pdf.js entirely, but what I think was really wanted in bug 792816 is a way to not ignore certain document permissions within PDF's. First, we need to support this on the pdf.js side of things and then add policy stuff for it.
1) Expose a way to read the bit fields of the "User access permissions" from the PDF in PDF.js (see section 7.6.3.2 and Table 22 of the PDF spec[1]). We'll have to read this in on the worker side, then send and expose it to the main thread. We have something very similar to this for getting a document's info. API: https://github.com/mozilla/pdf.js/blob/a7a034d803094b5d421a0d429c84906aea94edf2/src/display/api.js#L686 Worker side: https://github.com/mozilla/pdf.js/blob/c33bf800cc87941cc681c3c54279ab1b9745650d/src/core/worker.js#L706 Where the data is actually read: https://github.com/mozilla/pdf.js/blob/a7a034d803094b5d421a0d429c84906aea94edf2/src/core/document.js#L545 2) Add a preference to the PDF.js viewer to respect the above document permissions. Somewhere in the viewer startup then we'll read that pref and take some actions e.g. disabling selection on the text layer by adding "-moz-user-select: none" https://github.com/mozilla/pdf.js/blob/master/web/app_options.js 3) Add a function to check within Firefox if we should enable the above preference. Close example is how we check to see if the find bar is supported. On the pdf.js side: https://github.com/mozilla/pdf.js/blob/a8e9f6cc290e4f12ceb01f36c783477d1fc75bfe/web/firefoxcom.js#L281 On the Firefox side: https://searchfox.org/mozilla-central/rev/a0665934fa05158a5a943d4c8b277465910c029c/browser/extensions/pdfjs/content/PdfStreamConverter.jsm#313 Feel free to ping me in the #pdfjs channel. Yury also hangs out there and knows a lot about the viewer as well. [1] https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf
Priority: -- → P5

We're not going to address this in policy. It should be fixed in PDF.js ( bug 792816) or not at all.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX

FYI, this is fixed in PDF.js via policy. It will be in Firefox 77 and the 78 ESR.

You need to log in before you can comment on or make changes to this bug.