Skip to content

Exported pdf is 0 bytes #136

@drewharvey

Description

@drewharvey

Describe the bug

I am able to download the PDF file but it is 0 bytes and fails to open. All other file types download/open correctly.

files

Expected behavior

PDF should have content and open as expected.

Minimal reproducible example

var grid = new Grid<String>();
grid.addColumn(String::toString).setHeader("Name");
grid.addColumn(String::toString).setHeader("Email");

grid.setItems("A", "B", "C");

var exporter = GridExporter.createFor(grid);
exporter.setTitle("Grid Export Title");
exporter.setFileName("GridExport_" + new SimpleDateFormat("yyyyddMM").format(Calendar.getInstance().getTime()));
exporter.setAutoAttachExportButtons(true);

add(grid);

Add-on Version

2.3.2

Vaadin Version

24.4.3

Additional information

Chrome (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions