public class Security extends Object
Encapsulates information used in pdf Security.
[C#] Pdf pdf1 = new Pdf(); pdf1.Security = new Security(); pdf1.Security.IsCopyingAllowed = false; pdf1.PageSetup.PageHeight = PageSize.A2Height; Section sec1 = pdf1.Sections.Add(); Text text1 = new Text(sec1,"this is text content"); text1.Margin.Top = 30; sec1.Paragraphs.Add(text1); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() pdf1.Security = New Security() pdf1.Security.IsCopyingAllowed = False pdf1.PageSetup.PageHeight = PageSize.A2Height Dim sec1 As Section = pdf1.Sections.Add() Dim text1 As Text = New Text(sec1, "this is text content") text1.Margin.Top = 30 sec1.Paragraphs.Add(text1) pdf1.Save(...) [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf" IsCopyingAllowed="false"> <Section PageHeight="1684"> <Text MarginTop="30"> <Segment>this is text content</Segment> </Text> </Section> </Pdf>
Constructor and Description |
---|
Security()
Initializes a new instance of the
Security class. |
Modifier and Type | Method and Description |
---|---|
boolean |
getIs128BitsEncrypted()
Gets or sets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted.
|
String |
getMasterPassword()
Gets or sets a string that indicates the master password used in pdf encryption.
|
String |
getUserPassword()
Gets or sets a string that indicates the user password used in pdf encryption.
|
boolean |
isAnnotationsModifyingAllowed()
Gets or sets a bool value that indicates whether adding or modifying text annotations
is allowed.
|
void |
isAnnotationsModifyingAllowed(boolean value) |
boolean |
isContentsModifyingAllowed()
Gets or sets a bool value that indicates whether modifying contents is allowed.
|
void |
isContentsModifyingAllowed(boolean value) |
boolean |
isCopyingAllowed()
Gets or sets a bool value that indicates whether copying or otherwise extracting
text and graphics from the document is allowed.
|
void |
isCopyingAllowed(boolean value) |
boolean |
isDefaultAllAllowed()
Gets or sets a bool value that indicates if all permissions are set to allowed as default.
|
void |
isDefaultAllAllowed(boolean value) |
boolean |
isDegradedPrintingAllowed()
Gets or sets a bool value that indicates whether printing in low resolution is allowed.
|
void |
isDegradedPrintingAllowed(boolean value) |
boolean |
isDocumentAssemblyingAllowed()
Gets or sets a bool value that indicates whether assembling the document is allowed.
|
void |
isDocumentAssemblyingAllowed(boolean value) |
boolean |
isFormFillingAllowed()
Gets or sets a bool value that indicates whether filling in forms and
signing the document is allowed.
|
void |
isFormFillingAllowed(boolean value) |
boolean |
isPrintingAllowed()
Gets or sets a bool value that indicates whether printing is allowed.
|
void |
isPrintingAllowed(boolean value) |
boolean |
isScreenReadersAllowed()
Gets or sets a bool value that indicates whether screen readers are allowed.
|
void |
isScreenReadersAllowed(boolean value) |
void |
setIs128BitsEncrypted(boolean value) |
void |
setMasterPassword(String value) |
void |
setUserPassword(String value) |
public boolean getIs128BitsEncrypted()
Gets or sets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted. Default is false, 40 bits encrypted.
public void setIs128BitsEncrypted(boolean value)
public String getUserPassword()
Gets or sets a string that indicates the user password used in pdf encryption.
public void setUserPassword(String value)
public String getMasterPassword()
Gets or sets a string that indicates the master password used in pdf encryption.
public void setMasterPassword(String value)
public boolean isPrintingAllowed()
Gets or sets a bool value that indicates whether printing is allowed. Default is true.
IsPrintingAllowed
and IsDegradedPrintingAllowed
should be false.
public void isPrintingAllowed(boolean value)
public boolean isContentsModifyingAllowed()
Gets or sets a bool value that indicates whether modifying contents is allowed. Default is true.
public void isContentsModifyingAllowed(boolean value)
public boolean isCopyingAllowed()
Gets or sets a bool value that indicates whether copying or otherwise extracting text and graphics from the document is allowed. Default is true.
public void isCopyingAllowed(boolean value)
public boolean isAnnotationsModifyingAllowed()
Gets or sets a bool value that indicates whether adding or modifying text annotations is allowed. Default is true.
public void isAnnotationsModifyingAllowed(boolean value)
public boolean isFormFillingAllowed()
Gets or sets a bool value that indicates whether filling in forms and signing the document is allowed. Default is true.
public void isFormFillingAllowed(boolean value)
public boolean isScreenReadersAllowed()
Gets or sets a bool value that indicates whether screen readers are allowed. Default is true.
public void isScreenReadersAllowed(boolean value)
public boolean isDocumentAssemblyingAllowed()
Gets or sets a bool value that indicates whether assembling the document is allowed. This includes inserting, rotating, or deleting pages and creating navigation elements such as bookmarks or thumbnail images. Default is true.
public void isDocumentAssemblyingAllowed(boolean value)
public boolean isDegradedPrintingAllowed()
Gets or sets a bool value that indicates whether printing in low resolution is allowed. Default is true.
IsPrintingAllowed
and IsDegradedPrintingAllowed
should be false.
public void isDegradedPrintingAllowed(boolean value)
public boolean isDefaultAllAllowed()
Gets or sets a bool value that indicates if all permissions are set to allowed as default. Default value is true. If this property is set to false, then all permissions are set to NOT allowed.
public void isDefaultAllAllowed(boolean value)
Copyright © 2016 Aspose. All Rights Reserved.