Prevent pdf from opening in Acrobat after download

Which product are you using?
PDFJS Express

PDF.js Express Version
8

Detailed description of issue
I am saving annotated pdf’s to my local computer with the following function:

const options = {
  filename: filename,
  xfdfString: xfdfString,
  flags: instance.Core.SaveOptions.LINEARIZED,
  downloadType: 'pdf'
};

instance.UI.downloadPdf(options);

When the file is download, Adobe Acrobat automatically opens the file. I’m not sure if this is a PDFJS Express issue, but any thoughts on what could be causing this behavior?

Expected behaviour
When I download the pdf document, I don’t expect it to automatically open.

Does your issue happen with every document, or just one?
{Answer here}

Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here

Hi there,

This is not an express issue. What’s happening is your computer’s OS is automatically opening the file after download.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.


Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here