Page MenuHomePhabricator

Add a PDF document "rendering" engine
ClosedPublic

Authored by epriestley on Mar 23 2018, 12:10 PM.
Tags
None
Referenced Files
F14423200: D19252.id46094.diff
Wed, Dec 25, 8:42 AM
F14415009: D19252.id.diff
Tue, Dec 24, 4:44 PM
Unknown Object (File)
Thu, Dec 12, 11:30 PM
Unknown Object (File)
Thu, Dec 12, 12:09 AM
Unknown Object (File)
Sun, Dec 8, 6:09 PM
Unknown Object (File)
Fri, Dec 6, 6:59 AM
Unknown Object (File)
Mon, Dec 2, 5:25 PM
Unknown Object (File)
Thu, Nov 28, 11:40 AM
Subscribers
None

Details

Summary

Depends on D19251. Ref T13105. This adds rendering engine support for PDFs.

It doesn't actually render them, it just renders a link which you can click to view them in a new window. This is much easier than actually rendering them inline and at least 95% as good most of the time (and probably more-than-100%-as-good some of the time).

This makes PDF a viewable MIME type by default and adds a narrow CSP exception for it. See also T13112.

Test Plan
  • Viewed PDFs in Files, got a link to view them in a new tab.
  • Clicked the link in Safari, Chrome, and Firefox; got inline PDFs.
  • Verified primary CSP is still object-src 'none' with curl ....
  • Interacted with the vanilla lightbox element to check that it still works.

Diff Detail

Repository
rP Phabricator
Branch
docu2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19909
Build 26986: Run Core Tests
Build 26985: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 23 2018, 2:14 PM
This revision was automatically updated to reflect the committed changes.