DynaPDF.GetUseExactPwd
----------------------

Queries if exact password is needed to unlock PDF.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetUseExactPwd"; PDF ) 

**MBS**( **"DynaPDF.GetUseExactPwd";** /\* Queries if exact password is needed to unlock PDF. \*/  
**$PDF**) /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |

### Result

Returns value or error.

### Description

Queries if exact password is needed to unlock PDF.  
If the property UseExactPwd is 0, an encrypted PDF file can always be decrypted, if either the open or owner password in the file is an empty string. If 1, the open or owner password must be known to open the PDF file (see also [DynaPDF.SetUseExactPwd](DynaPDFSetUseExactPwd.md)).   
Default value = 1  
If your application should allow the modification of encrypted PDF files, you may check the access permissions to grant user rights, if the file was opened with the open password instead of the owner password (see also [DynaPDF.GetUserRights](DynaPDFGetUserRights.md)).   
Due to the license agreement of Adobe, all manufacturers of applications which make the treatment of encrypted PDF files possible, must respect the access permissions of a PDF file, if the file was opened with the open password.   
Only if the file was opened with the owner password, all rights should be granted. See PDF Reference 1.5 for further information.   
The property UseExactPwd should be 1, if the application is a commercial software product.   
See also [GetUseExactPwd](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetUseExactPwd.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetUserRights](DynaPDFGetUserRights.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetUseExactPwd](DynaPDFSetUseExactPwd.md)

This function checks for a license.

Created 6th February 2015 , last changed 6th February 2015

  
[DynaPDF.GetTrapped](DynaPDFGetTrapped.md) - [DynaPDF.GetUseGlobalImpFiles](DynaPDFGetUseGlobalImpFiles.md)

[HTML Version](DynaPDFGetUseExactPwd.shtml)