Failed to save document after setting password to it
We're using PDDocCopyToFile(pDoc,¶ms) in our custom C++ plug-in and it works fine. But if the user opens non protected document, then in Adobe Acrobat settings sets password to the document and then presses our "save command button", it fails in our call to PDDocCopyToFile API method.
Alternatively, we tried params.saveChanges = false and just PDDocSave, but with these either changes were gone or password protection was lost.
Should we specify any extra parameters to use PDDocCopyToFile with password protected files? Or how we should proceed further, if the user sets password for the current opened document, to save it afterwords prorgamatically and do not lose the changes? We couldn't find anything related in API documentation. Any suggestions are higly appricieated.
