0

I'm currently working on a PHP project where you can upload (through a simple file_get_contents) and edit a PDF. My current goal is to detect if the uploaded PDF is protected in any way (read only, encrypted, password protected) so I can reject it during the upload process.

I'm using TCPDI, but open to other suggestions (including parsing the whole string). I've also found a thread about using Ghostscript, but it seems that option isn't reliable :

is it possible to check if pdf is password protected using ghostscript?

Regards,

Mouke
  • 854
  • 1
  • 7
  • 19
  • Are you searching for an open-source/free solution or would a [paid one](https://manuals.setasign.com/setapdf-core-manual/standard-encryption/#index-4) work for you too? – Jan Slabon Aug 06 '20 at 12:24
  • I would prefer a free solution, if possible :) – Mouke Aug 10 '20 at 06:59

0 Answers0