Visitar URL original
Vend wrapped version of PDF instead of direct CDN download · Issue #431 · documentcloud/documentcloud · GitHub
Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
This repository was 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

Description

@reefdog

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

Activity

  1. knowtheory commented on Nov 16, 2016

    @knowtheory
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions