SetPrivilege
İçindekiler
[
Saklamak
]SetPrivilege(DocumentPrivilege)
Boş kullanıcı/sahip parolalarıyla Pdf dosyası güvenliğini ayarlar. Sahip parolası rastgele bir dizeyle eklenecektir. İşlem başarısız olursa bir istisna atar.
public bool SetPrivilege(DocumentPrivilege privilege)
Parametre | Tip | Tanım |
---|---|---|
privilege | DocumentPrivilege | Ayrıcalık ayarlayın. |
Geri dönüş değeri
Başarı için doğru.
Örnekler
[C#]
string inFile = "D:\\input.pdf"; // TestPath yeniden atanabilir.
string outFile = "D:\\output.pdf"; // TestPath yeniden atanabilir.
PdfFileSecurity fileSecurity = new PdfFileSecurity(inFile,outFile);
fileSecurity.SetPrivilege(DocumentPrivilege.Print);
[Visual Basic]
Dim inFile As String = "D:\\input.pdf" 'The TestPath may be re-assigned.'
Dim outFile As String = "D:\\output.pdf" 'The TestPath may be re-assigned.'
Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity(inFile,outFile)
fileSecurity.SetPrivilege(DocumentPrivilege.Print)
Ayrıca bakınız
- class DocumentPrivilege
- class PdfFileSecurity
- ad alanı Aspose.Pdf.Facades
- toplantı Aspose.PDF
SetPrivilege(string, string, DocumentPrivilege)
Orijinal parola ile Pdf dosyası güvenliğini ayarlar. İşlem başarısız olursa bir istisna atar.
public bool SetPrivilege(string userPassword, string ownerPassword, DocumentPrivilege privilege)
Parametre | Tip | Tanım |
---|---|---|
userPassword | String | Orijinal kullanıcı şifresi. |
ownerPassword | String | Orijinal sahip şifresi. |
privilege | DocumentPrivilege | Ayrıcalık ayarlayın. |
Geri dönüş değeri
Başarı için doğru.
Örnekler
[C#]
string inFile = "D:\\input.pdf"; // TestPath yeniden atanabilir.
string outFile = "D:\\output.pdf"; // TestPath yeniden atanabilir.
PdfFileSecurity fileSecurity = new PdfFileSecurity(inFile,outFile);
fileSecurity.SetPrivilege(userPassword, ownerPassword, DocumentPrivilege.Print);
[Visual Basic]
Dim inFile As String = "D:\\input.pdf" 'The TestPath may be re-assigned.'
Dim outFile As String = "D:\\output.pdf" 'The TestPath may be re-assigned.'
Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity(inFile,outFile)
fileSecurity.SetPrivilege(userPassword, ownerPassword, DocumentPrivilege.Print)
Ayrıca bakınız
- class DocumentPrivilege
- class PdfFileSecurity
- ad alanı Aspose.Pdf.Facades
- toplantı Aspose.PDF