Direct download a PDF file without viewing

Hi, I’ve a problem which is quite easy to solve i guess (tried several approaches).
I have stored pdf’s as attachements for a document entity.
Now I would like to direct (from a multiselectable screentable) download 1-n pdf’s to the client without opening it in the browser and do it from within the pdf-viewer one-by-one.
Each time I try to download it via,ExportFormat.PDF);

each pdf would be opened in a separate browser-tab.
How can I prevent that behavior.

Use other format like “ExportFormat.ZIP” will direct download the file.

Perfect. Thx.

Also, you can try to customize the cuba.web.viewFileExtensions property
(see documentation)

PDF files are opened in browser by default.