Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Vend wrapped version of PDF instead of direct CDN download #431

Open
reefdog opened this issue Nov 16, 2016 · 1 comment
Open

Vend wrapped version of PDF instead of direct CDN download #431

reefdog opened this issue Nov 16, 2016 · 1 comment

Comments

@reefdog
Copy link
Contributor

reefdog commented Nov 16, 2016

Folks often share links directly to PDFs hosted on the CDN, like so. This isn't great, as there's no way to get back to the full viewer (thus no way to see who uploaded it, view the notes, etc.). We don't want to block the raw PDF, but we do want to maintain our brand and point people to the viewer if they want.

What we plan to do:

  • Build a simple wrapper: header with logo and link to the full document + otherwise full-screen embed of native PDF (using <embed> or <iframe>, TBD)
  • Serve the wrapped version from the platform with a URL like https://www.documentcloud.org/documents/282753-lefler-thesis.pdf
  • Change the document JSON to reference the platform version resources['pdf']
  • Reference the CDN version as resources['raw_pdf'] or something
  • Change the raw PDF to have an attachment content disposition (force a download)

Unanswered questions:

  • How to set an attachment content disposition on the raw PDF without requiring two PDFs
  • Whether <embed> or <iframe> are preferable for wrapping the raw PDF

Example wrapper:

wrapper

@knowtheory
Copy link
Member

And i'd still like a rightward pointing arrow that leads to the reporting the document is linked to :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants