mankis
asked on
pdftk- merge secured and not secured pdf files
I use pdftk to merge uploaded pdfs. Someone uploaded pdf file that is flaged as secured, and now merging is not working.
This is my code in PHP:
This is my code in PHP:
$command = 'pdftk '.$filesstring.' cat output '.$databasefilename;
$result = shell_exec($command);
header('Content-disposition: attachment; filename='.$databasefilename);
header('Content-type: application/pdf');
readfile($databasefilename);
Is there some solution for secured files, to unlock it before merging or something else?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I haven't, sorry. But I will. I have to wait for provider to install it for me. I will accept your answer and if I have more questions after I try it I will start new question. Thanks.
Hi mankis,
I'm going to suggest that you re-open this question and wait for your provider to install QPDF. It's important that proposed answers to questions be confirmed as working, so simply accepting my answer when you haven't tried it is not the right thing to do, much as I realize that's exactly what you were trying to do. I really don't mind waiting for a while, and then if it doesn't work for you (even though it did for me), we can continue the troubleshooting. To re-open the question, click on the Request Attention link in the upper right (under your question). Regards, Joe
I'm going to suggest that you re-open this question and wait for your provider to install QPDF. It's important that proposed answers to questions be confirmed as working, so simply accepting my answer when you haven't tried it is not the right thing to do, much as I realize that's exactly what you were trying to do. I really don't mind waiting for a while, and then if it doesn't work for you (even though it did for me), we can continue the troubleshooting. To re-open the question, click on the Request Attention link in the upper right (under your question). Regards, Joe
Have you had a chance to try QPDF yet? Regards, Joe