Skip to content

[BUG] Uses internal PDF viewer to view PDFs when Content-Disposition set to inline rather than downloading #3365

@waynerobinson

Description

@waynerobinson

Context:

  • Playwright Version: 1.2.1
  • Operating System: Mac
  • Node.js version: 12.14
  • Browser: Chromium

Describe the bug

When navigating to PDF that is delivered with the header Content-Disposition: inline, Playwright opens in a new page and uses the embedded Chromium PDF viewer.

From this point it's impossible to get the actual PDF content. Even when inspecting the response event, the actual response object's body only contains the HTML presenting the embedded viewer with an inline ID representing the PDF.

Whilst I'm sure there are some situations that would warrant the in-browser PDF viewer being turned on, I would guess that having these download by default would be the more common use-case within Playwright.

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