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

Bu içerik yalnızca Rumence ve İngilizce olarak mevcuttur; aşağıda İngilizce metin gösterilmektedir.

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.

BENZER SORULAR

İlginizi çekebilecek bazı sorular ve yanıtları. Müşterilerimiz için önemli ve pratik soruları yanıtlıyoruz.

BÜLTENİMİZE ABONE OLUN

Bültenimize abone olun. Onu yalnızca önemli bilgiler için kullanıyoruz.

Bülten aboneliği illüstrasyonu