PDF Opening Issues

Can Java Force a PDF to Open in Adobe Acrobat Instead of Chrome?

Algirdas JasaitisAlgirdas Jasaitis Nov 19, 2026 868 views

Question details

The developer wants a Java- or Oracle-generated PDF to open automatically in Adobe Acrobat DC rather than Chrome.

Can Java Force a PDF to Open in Adobe Acrobat Instead of Chrome?
Product
Java-generated PDF, Google Chrome, and Adobe Acrobat DC
Device & OS
not provided
Scenario
A Java application delivers a PDF to a user, and the developer wants Acrobat to be the viewer.
Observed behavior
The PDF opens in Chrome instead of Adobe Acrobat DC.
Before you start

Check whether the Java application serves the PDF through a browser and whether Adobe Acrobat DC is installed on the user's computer. Access to Chrome and operating system settings may be needed to change how the user opens the file.

Solution 1Recommended

Deliver the PDF as a Download from Java

Use PDF response headers to encourage a download instead of opening the file inline in Chrome.

A Java server can suggest how a PDF is delivered, but it cannot select Adobe Acrobat as the application on the user's computer.

1
Set the PDF content type

In the Java HTTP response that sends the file, set Content-Type to application/pdf, for example with response.setContentType("application/pdf").

2
Request a download

Set the response header Content-Disposition to attachment; filename="document.pdf", for example with response.setHeader("Content-Disposition", "attachment; filename=\"document.pdf\"").

3
Send and test the file

Write the PDF bytes to the response output stream, then open the download link in Chrome and check that the file downloads.

Deliver the PDF as a Download from Java
A download does not force Acrobat: The user may still need to open the downloaded PDF. The browser and the computer's default-app settings determine which viewer is used.
Free Microsoft Office alternative

Open Downloaded PDFs with WPS Office

WPS Office is a free, lightweight alternative for viewing downloaded PDFs and working with office documents in a familiar interface. It supports common Microsoft Office formats for easier migration, but it cannot force a remote user's browser or computer to launch a particular PDF app.

Open downloaded PDF files in a desktop application.Compatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTX.Use a familiar interface for common document tasks.Move between PDF and office documents in one lightweight suite.
microsoft office alternative - wps office

Frequently Asked Questions

Can a Java HTTP response force a PDF to open in Acrobat?

No. Java can send the PDF with Content-Type and Content-Disposition headers, but the browser, operating system, and user's settings decide which application opens it.

What is the difference between inline and attachment for a PDF?

Content-Disposition: inline suggests displaying the PDF in the browser, while Content-Disposition: attachment suggests downloading it. Neither setting selects Adobe Acrobat.

Why does a PDF still open in Chrome after I set Acrobat as the default?

Chrome can use its built-in viewer for PDFs opened in the browser. To download them instead, check Chrome Settings > Privacy and security > Site settings > Additional content settings > PDF documents.

Will downloading a PDF automatically launch Acrobat?

Not necessarily. The PDF may remain in the Downloads list until the user opens it. If Acrobat is the default PDF app, opening the downloaded file from the computer should launch it in Acrobat.