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

هذا المحتوى متوفر باللغتين الرومانية والإنجليزية فقط؛ يظهر النص الإنجليزي أدناه.

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.

أسئلة ذات صلة

إليك بعض الأسئلة التي قد تهمك إجاباتها. نجيب عن الأسئلة المهمة والعملية لعملائنا.

اشترك في النشرة الإخبارية

اشترك في النشرة الإخبارية. لا نستخدمها إلا للمعلومات المهمة.

رسم توضيحي للاشتراك في النشرة الإخبارية