Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shing_shing's avatar

How to hide download button from pdf viewer in browser after generating it using DOMPDF?

I don't know anymore.

0 likes
5 replies
Snapey's avatar
Snapey
Best Answer
Level 122

not possible. The user has already downloaded it in order to show it in their pdf viewer.

This company has some enterprise class software for heavily controlled environments (one where you can place restrictions on what the employees can do with their computer) https://www.locklizard.com/prevent-save/

jove's avatar

@shing_shing You have already given the user the document, you can't stop them from downloading it, it could be printed, copied from the temp folder etc.

jove's avatar

If this answers your question you should mark @snapey's answer as the solution :)

Please or to participate in this conversation.