pdfinfo does it.


On Tuesday, April 25, 2017 at 1:29:22 PM UTC-7, Ben wrote:
>
> Thank you  for yor help. Seems I need to study the code a bit.
>
> The weird thing is: The PDF doesn't ask for a password.( I think it was 
> downloaded somewhere ) I can open it and I could convert it by printing it 
> through a PDF to file printer to get rid of the encryption.
> I will deploy Mayan some day in a law firm, I 'm working for for several 
> years. They don't create any password protected PDFs there but get a lot 
> PDFs by mail.
> So I definitely need some way to detect encrypted PDF.
>
pdfinfo will do it, so if you need to 'detect' it(from a terminal), you can 
do "pdfinfo | grep 'Encrypted' "

Also, like I said, pdftk will strip out the encryption(and 
DRM-restrictions) easily.

As far as being able to open it/print it:
Firefox's built in PDF viewer ignores all restrictions.
Other browsers and clients tend to follow the DRM restrictions - Chrome, 
Internet Explorer, Edge, Adobe, SumatraPDF etc.
A few - Okular on KDE/Linux, for instance - have an option in the settings 
as to whether to ignore the restrictions or not.

If a user password is set, it actually encrypts the file and prevents 
access without it.
If a user password is *not* set, the restrictions that can be set involve 
copying or printing... and it depends on whether or not the client 
'follows' the restrictions.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to