Open Nokia808 opened 5 years ago
I'd like to ask: if a pdf is encrypted, will Slicer have any sort of issues in merging/cropping/splitting/rotating it?
@amivaleo If PDF file is already encrypted, then you will never be able to merging/cropping/splitting/rotating it by any tool UNLESS you 1st decrypt it. As long as it is encrypted, then you can not manipulate it.
Encryption is either
So, it will be very useful if pdfslicer show if PDF is encrypted or not instead to suffer from error message. Moreover, QPDF already have a very very powerful decryption/encryption powers. To decrypt an encrypted PDF, you have only to run:
$ qpdf --decrypt input.pdf output.pdf
you will get output.pdf as a decrypted copy from original encrypted PDF. On this decrypted copy you can do what you like from annotation, editing, rotating, deleting, adding, ......
Uhm... Slicer might show a blue banner warning the user that the pdf is encrypted and that he has to decrypt it before continuing. A single button on that banner would do the work.
Let's wait for a reply from Julian.
@Nokia808
Could you provide a sample encrypted file? I mean an encrypted file that can be opened but can't be edited. I want to see how Slicer currently handles this kind of files.
@Nokia808
To decrypt an encrypted PDF, you have only to run:
$ qpdf --decrypt input.pdf output.pdf
Does this mean that a PDF can get decrypted without providing a password?
@junrrein I tried to attach it here but system refusing ! It's size just 3.4 MB ! It said "not support this file type", though it is a .pdf file ! Please can you contact me at yousifjkadom@yahoo.com so as to send it as attached file with email ?
@Nokia808
You can send me the file to "junrrein at gmail dot com".
@junrrein I sent it to you. Please if you have public PGP key then, kindly, send it to me. I already sent my public PGP for my Yahoo mail to you.
@Nokia808
Sorry, I don't use PGP. Thanks for the example, I will take a look at it in the following days.
@Nokia808
I was able to remove and rotate pages of the file you sent me. Of course the encryption is lost when saving the file.
Could you please provide a document where you can't do these things using Slicer?
@junrrein Sorry for that ! I investigate the PDF & it is NOT FULLY encrypted ! When you asked me for an example it was about midnight in Baghdad & I was sleepy, so I did not investigate this PDF.
Please look for following screenshot from Windows PDF editor (it show security section of PDF metadata):
As you see it is not fully encrypted & some operations are allowed & by these QPDF is able to manipulate it .....
Please give me time to find fully encrypted PDF because I decrypted most of encrypted files that I downloaded ......
By the way, do you know now why I asked you to make pdfslicer able to show metadata (document info) of PDF at:
https://github.com/junrrein/pdfslicer/issues/101
Unfortunately no Linux application able to to this apart from jPDFTweak which not maintained further. And no any PDF viewer (even Okular that I opened a request for this feature since long time without response), have such ability .....
If pdfslicer was able to show such information, then you will be able to know why QPDF able to manipulate PDF though it is encrypted.
Hi. I opened a tick about this issue in QPDF GitHub repository as referenced above. Let we see what QPDF developer will replay .....
Please refer to that issue on QPDF repository on GitHub to examine fully encrypted PDF that I created as example & how QPDF manipulated it without previous use of --decrypt option to decrypt it manually !
@junrrein Hi. Please notice the replay from developer of QPDF on this issue in "referenced".
Hi. On windows & mac application, when user open an encrypted PDF (whither 100% encryption or just partially encrypted like not allowed printing only), the PDF application show notification said "Encrypted". Unfortunately, there is no any PDF application on Linux have this ability ! So, I can not know that PDF is encrypted or not unless on window or when I tried to edit it !
It will be nice to add such ability to your application. You can make it persistent message not a notification by make it appear beside name of PDF. Suppose that user open a PDF file named "Embryology", then it's name currently appear in current version at middle of upper border of program window as "Embryology.pdf" . I suggest on you to be "Embryology.pdf (Encrypted)".
It is small feature but of big value, so please give it your attention .....