mip_sdk PDF PFILE opening in Edge

163 Views Asked by At

My intention is to encrypt a pdf file using MIP SDK on Ubuntu, later to be opened via latest version of Edge, the same way as it is working by running the PowerShell command Set-AIPFileLabel against a PDF file.

I've noticed that file_sample (version 1.8.97) is generating a pfile file once protecting a pdf file.

./file_sample --username xxx --password yyy -f File.pdf -s e34d7a96-f751-4283-b017-25605f94a6d6 New file created: File.pdf.pfile

/file_sample --username xxx --password yyy -f File.pdf.pfile -g Something bad happened: Failed to open file, , CorrelationId=217d288a-53a8-4b13-9731-43c7bf01579b, CorrelationId.Description=FileEngine Exiting.

After copying that pfile on Windows OS, I was not able to open it with Edge, neither with AIP viewer.

Question #1: how can I use file_sample to protect a PDF document in a way to be able to view it via Edge browser?

Question #1: How can I add custom permission with file_sample ? let say for a specific user (ex:[email protected]) specific permission (ex: only view), similar that we can do with Powershell -> New-AIPCustomPermissions

Thank you

1

There are 1 best solutions below

0
On

It's important that I state that the sample apps are not supported for production use.

With that covered, for ad hoc protection, you need to look at the --protect switch.

("p,protect", "Protect with custom permissions protection to comma-separated user list." " or as permissions to those users", cxxopts::value())

If you remove the .pfile from the extension, can you open it in Edge? The sample app should be creating a valid PDF file, assuming the input PDF supports the IRM spec (I think PDF verison 1.7 or later).