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.
On Tuesday, 25 April 2017 21:15:39 UTC+2, MacRobb Simpson wrote: > > > >> What part of Mayan cannot handle encrypted pdfs? Is there any workaround? >> > Internally, it uses pdftotext and pdftoppm > > > >> At the moment i'm only testing with ebook files, but how can I handle >> encrypted pdf documents in a company? They are not password protected, so >> that a document might be encrypted is for a normal user not obvious. >> > Um... From my own testing, you have to have a password to encrypt it, at > least an owner password. > If you know the password, pdftoppm can be given it with a '-opw' command > line option(which would have to be edited into the correct area of Mayan > code). > Alternately, pdftk can do this. > You might be able to replace the call to 'pdftoppm *file*' to 'pdftk > *file* output - allow AllFeatures | pdftoppm' or something like this. > (looks like a lot of the code is in apps/converter/backends/python.py > You might also end up writing a little shell script that does this > replacement, and use that as the path to pdftoppm, or something like this. > > Alternately, if you feel comfortable editing the code, modify that backend > to where it tries to do it with just pdftoppm, if that fails, then use > pdftk to strip it first. > This would provide the best balance of speed and capability. > > -- --- 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.
