I know this thread is a little old but I am hoping to get some help !
I need to remove the restrictions from a PDF that is automatically generated from one of our systems. The software generating the PDF also generates a random 7 character password as the owner password which changes for each file. The user password is blank.
I need to be able to change the files metadata to allow our PDF store to index the documents appropriately.
If i use the restrictions remover in pdfmaniupation2.vb ( a great bit of code btw) then it does not remove the owner password, but does change all the permissions listed to allowed (apart from page extraction)
When I use my code to change the metadata I get an exception "PdfReader not opened with owner password"
my reading of the code in pdfmanipulation2.vb is that it should create a new PDf with the contents of the old, but it should have no encryption and have no restrictions - have I got this wrong ?, can anyone advise a better way of doing this ?
thanks


Reply With Quote

