(VB.NET) Pipe delimited arguments for SetPrivilege()


#1

I'm having trouble using the SetPrivilege() method in VB.Net. I want to specify multiple privileges, but the pipe-delimited arguments syntax doesn't even appear to be legal VB.

The example code from your online documentation is as follows:

[Visual Basic]
...
Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity(inFile,outFile)
fileSecurity.SetPrivilege(PdfPrivilege.Assembly|PdfPrivilege.ScreenReaders)

But this syntax will not even compile! Also, while you're addressing this, I'd also ask/recommend that you make the documentation for this method a little more comprehensive; in my opinion, its behavior is far from intuitive.

Thanks.


#2

Thanks for considering Aspose.Pdf.Kit

I will test ASAP.


#3

Sorry for the syntax mistake in the kit documentation, the β€˜|’ should be β€˜Or’ in Visual Basic, we will correct it in next release.
SetPrivilege() specifies which access permissions should be granted when is opened with user access, the permissions include printing,modifying,extracting content,filling forms, etc.


#4

sthomas is right, your documentation needs more detail. What are the default privileges??


#5

We will modify our document to make it more detailed. The default privilege is "all allowed".