Click or drag to resize

getDocumentSecurity Method

Gets the document security information (user password, etc) for the current document in the PdfWebControl instance.

Syntax
JavaScript
function getDocumentSecurity();

Parameters

None

Return Value

Type: PdfDocumentSecurity Class

Returns a JavaScript object representing the current document security settings.

Remarks

This method will return an object whose members can be changed; however any changes made will not affect the object until the setDocumentSecurity Method is called.

Examples
JavaScript
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance

//get current view
var mySecurity = myApi.getDocumentSecurity();

//show current security status
window.alert(mySecurity.userPassword ? "A user password is set." : "No user password is set.");
See Also