BrowserFrame embedded PDF not working from version 7.0.1

Hi,
as from version 7.0.1 to 7.0.4 BrowserFrame does not correctly show embedded files (like PDF).

<browserFrame id="viewer" width="100%"/>
    @WindowParam(name = BrowserUtils.PARAM_FILE_DESCRIPTOR)
    private FileDescriptor fileDescriptor;

    public void onInit(InitEvent event) {
        try {
                viewer.setSource(FileDescriptorResource.class).setFileDescriptor(fileDescriptor);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

I created a simple screen that show embedded PDF but as from 7.0.1 version when the screen is opened the document is downloaded instead of being shown on the screen.
With previous versions everything worked fine.
Thanks
Fabrizio

Hi,

Thank you for reporting the issue. We have a similar one.

Regards,
Gleb

Hi,
sorry I had not found the similar issue.
Many thanks

As a workaround you can define a mimeType as application/pdf (setMimeType("application/pdf")).

1 Like

Thanks, now works as expected.