How do I make a PDF on my website download instead of opening in the browser?

Dieser Inhalt ist nur auf Rumänisch und Englisch verfügbar; unten sehen Sie den englischen Text.

How do I make a PDF on my website download instead of opening in the browser?

Configure the file response to include the Content-Disposition HTTP header with the value attachment, while keeping the correct content type, application/pdf. You can do this in the application that serves the document or through a web server rule limited to the relevant files.

For a link to a file on the same domain, the HTML download attribute is a simple alternative, although behaviour can vary between browsers. Test the download on both desktop and mobile. If the document is private, check access permissions separately: triggering a download does not prevent someone from sharing the link.

ÄHNLICHE FRAGEN

Hier sind einige Fragen, deren Antworten Sie interessieren könnten. Wir beantworten wichtige und praktische Fragen für unsere Kunden.

NEWSLETTER ABONNIEREN

Abonnieren Sie unseren Newsletter. Wir nutzen ihn nur für wichtige Informationen.

Illustration Newsletter-Anmeldung