Renders a PDF using the browser's native viewer.

Vaadin 10 Java integration of the <pdf-browser-viewer> web component (https://github.com/IngressoRapidoWebComponents/pdf-browser-viewer).

Usage

StreamResource streamResource = new StreamResource(
        "report.pdf", () -> getClass().getResourceAsStream("/report.pdf")); // file in src/main/resources/

PdfBrowserViewer viewer = new PdfBrowserViewer(streamResource);
viewer.setHeight("100%");
layout.add(viewer);

Install

Link to this version
StableReleased 30 April 2021Apache License 2.0
Framework Support
Vaadin platform 14+
Install with
Release notes - Version 3.1.0

Updated to lrnwebcomponents/pdf-browser-viewer 2.7.10 and Vaadin 14.5.3.