Java Doc for PDStandardEncryption.java in  » PDF » PDFBox-0.7.3 » org » pdfbox » pdmodel » encryption » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » PDFBox 0.7.3 » org.pdfbox.pdmodel.encryption 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pdfbox.pdmodel.encryption.PDEncryptionDictionary
      org.pdfbox.pdmodel.encryption.PDStandardEncryption

PDStandardEncryption
public class PDStandardEncryption extends PDEncryptionDictionary (Code)
This class holds information that is related to the standard PDF encryption. See PDF Reference 1.4 section "3.5 Encryption"
author:
   Ben Litchfield
version:
   $Revision: 1.7 $


Field Summary
final public static  intDEFAULT_PERMISSIONS
     The default set of permissions which is to allow all.
final public static  intDEFAULT_REVISION
     The default revision of one is not specified.
final public static  StringFILTER_NAME
     The 'Filter' name for this security handler.
final public static  intREVISION2
     Encryption revision 2.
final public static  intREVISION3
     Encryption revision 3.
final public static  intREVISION4
     Encryption revision 4.

Constructor Summary
public  PDStandardEncryption()
     Default constructor that uses Version 2, Revision 3, 40 bit encryption, all permissions allowed.
public  PDStandardEncryption(COSDictionary dict)
     Constructor from existing dictionary.

Method Summary
public  booleancanAssembleDocument()
     This will tell if the user can insert/rotate/delete pages.
public  booleancanExtractContent()
     This will tell if the user can extract text and images from the PDF document.
public  booleancanExtractForAccessibility()
     This will tell if the user can extract text and images from the PDF document for accessibility purposes.
public  booleancanFillInForm()
     This will tell if the user can fill in interactive forms.
public  booleancanModify()
     This will tell if the user can modify contents of the document.
public  booleancanModifyAnnotations()
     This will tell if the user can add/modify text annotations, fill in interactive forms fields.
public  booleancanPrint()
     This will tell if the user can print.
public  booleancanPrintDegraded()
     This will tell if the user can print the document in a degraded format.
public  byte[]getOwnerKey()
     This will get the O entry in the standard encryption dictionary.
public  intgetPermissions()
     This will get the permissions bit mask.
public  intgetRevision()
     This will return the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.
public  byte[]getUserKey()
     This will get the U entry in the standard encryption dictionary.
public  voidsetCanAssembleDocument(boolean allowAssembly)
     Set if the user can insert/rotate/delete pages.
public  voidsetCanExtractContent(boolean allowExtraction)
     Set if the user can extract content from the document.
public  voidsetCanExtractForAccessibility(boolean allowExtraction)
     Set if the user can extract content from the document for accessibility purposes.
public  voidsetCanFillInForm(boolean allowFillingInForm)
     Set if the user can fill in interactive forms.
public  voidsetCanModify(boolean allowModifications)
     Set if the user can modify the document.
public  voidsetCanModifyAnnotations(boolean allowAnnotationModification)
     Set if the user can modify annotations.
public  voidsetCanPrint(boolean allowPrinting)
     Set if the user can print.
public  voidsetCanPrintDegraded(boolean allowAssembly)
     Set if the user can print the document in a degraded format.
public  voidsetOwnerKey(byte[] o)
     This will set the O entry in the standard encryption dictionary.
public  voidsetPermissions(int p)
     This will set the permissions bit mask.
public  voidsetRevision(int revision)
     This will set the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.
public  voidsetUserKey(byte[] u)
     This will set the U entry in the standard encryption dictionary.

Field Detail
DEFAULT_PERMISSIONS
final public static int DEFAULT_PERMISSIONS(Code)
The default set of permissions which is to allow all.



DEFAULT_REVISION
final public static int DEFAULT_REVISION(Code)
The default revision of one is not specified.



FILTER_NAME
final public static String FILTER_NAME(Code)
The 'Filter' name for this security handler.



REVISION2
final public static int REVISION2(Code)
Encryption revision 2.



REVISION3
final public static int REVISION3(Code)
Encryption revision 3.



REVISION4
final public static int REVISION4(Code)
Encryption revision 4.




Constructor Detail
PDStandardEncryption
public PDStandardEncryption()(Code)
Default constructor that uses Version 2, Revision 3, 40 bit encryption, all permissions allowed.



PDStandardEncryption
public PDStandardEncryption(COSDictionary dict)(Code)
Constructor from existing dictionary.
Parameters:
  dict - The existing encryption dictionary.




Method Detail
canAssembleDocument
public boolean canAssembleDocument()(Code)
This will tell if the user can insert/rotate/delete pages. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canExtractContent
public boolean canExtractContent()(Code)
This will tell if the user can extract text and images from the PDF document. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canExtractForAccessibility
public boolean canExtractForAccessibility()(Code)
This will tell if the user can extract text and images from the PDF document for accessibility purposes. true If supplied with the user password they are allowed to extract contentfrom the PDF document



canFillInForm
public boolean canFillInForm()(Code)
This will tell if the user can fill in interactive forms. true If supplied with the user password they are allowed to fill in form fields.



canModify
public boolean canModify()(Code)
This will tell if the user can modify contents of the document. true If supplied with the user password they are allowed to modify the document



canModifyAnnotations
public boolean canModifyAnnotations()(Code)
This will tell if the user can add/modify text annotations, fill in interactive forms fields. true If supplied with the user password they are allowed to modify annotations.



canPrint
public boolean canPrint()(Code)
This will tell if the user can print. true If supplied with the user password they are allowed to print.



canPrintDegraded
public boolean canPrintDegraded()(Code)
This will tell if the user can print the document in a degraded format. true If supplied with the user password they are allowed to print thedocument in a degraded format.



getOwnerKey
public byte[] getOwnerKey()(Code)
This will get the O entry in the standard encryption dictionary. A 32 byte array or null if there is no owner key.



getPermissions
public int getPermissions()(Code)
This will get the permissions bit mask. The permissions bit mask.



getRevision
public int getRevision()(Code)
This will return the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14. The encryption revision to use.



getUserKey
public byte[] getUserKey()(Code)
This will get the U entry in the standard encryption dictionary. A 32 byte array or null if there is no user key.



setCanAssembleDocument
public void setCanAssembleDocument(boolean allowAssembly)(Code)
Set if the user can insert/rotate/delete pages.
Parameters:
  allowAssembly - A boolean determining if the user can assemble the document.



setCanExtractContent
public void setCanExtractContent(boolean allowExtraction)(Code)
Set if the user can extract content from the document.
Parameters:
  allowExtraction - A boolean determining if the user can extract contentfrom the document.



setCanExtractForAccessibility
public void setCanExtractForAccessibility(boolean allowExtraction)(Code)
Set if the user can extract content from the document for accessibility purposes.
Parameters:
  allowExtraction - A boolean determining if the user can extract contentfrom the document.



setCanFillInForm
public void setCanFillInForm(boolean allowFillingInForm)(Code)
Set if the user can fill in interactive forms.
Parameters:
  allowFillingInForm - A boolean determining if the user can fill in interactive forms.



setCanModify
public void setCanModify(boolean allowModifications)(Code)
Set if the user can modify the document.
Parameters:
  allowModifications - A boolean determining if the user can modify the document.



setCanModifyAnnotations
public void setCanModifyAnnotations(boolean allowAnnotationModification)(Code)
Set if the user can modify annotations.
Parameters:
  allowAnnotationModification - A boolean determining if the user can modify annotations.



setCanPrint
public void setCanPrint(boolean allowPrinting)(Code)
Set if the user can print.
Parameters:
  allowPrinting - A boolean determining if the user can print.



setCanPrintDegraded
public void setCanPrintDegraded(boolean allowAssembly)(Code)
Set if the user can print the document in a degraded format.
Parameters:
  allowAssembly - A boolean determining if the user can print thedocument in a degraded format.



setOwnerKey
public void setOwnerKey(byte[] o) throws IOException(Code)
This will set the O entry in the standard encryption dictionary.
Parameters:
  o - A 32 byte array or null if there is no owner key.
throws:
  IOException - If there is an error setting the data.



setPermissions
public void setPermissions(int p)(Code)
This will set the permissions bit mask.
Parameters:
  p - The new permissions bit mask



setRevision
public void setRevision(int revision)(Code)
This will set the R entry of the encryption dictionary.

See PDF Reference 1.4 Table 3.14.

Note: This value is used to decrypt the pdf document. If you change this when the document is encrypted then decryption will fail!.
Parameters:
  revision - The new encryption version.



setUserKey
public void setUserKey(byte[] u) throws IOException(Code)
This will set the U entry in the standard encryption dictionary.
Parameters:
  u - A 32 byte array.
throws:
  IOException - If there is an error setting the data.



Fields inherited from org.pdfbox.pdmodel.encryption.PDEncryptionDictionary
final public static int DEFAULT_LENGTH(Code)(Java Doc)
final public static String DEFAULT_NAME(Code)(Java Doc)
final public static int DEFAULT_VERSION(Code)(Java Doc)
final public static int VERSION0_UNDOCUMENTED_UNSUPPORTED(Code)(Java Doc)
final public static int VERSION1_40_BIT_ALGORITHM(Code)(Java Doc)
final public static int VERSION2_VARIABLE_LENGTH_ALGORITHM(Code)(Java Doc)
final public static int VERSION3_UNPUBLISHED_ALGORITHM(Code)(Java Doc)
final public static int VERSION4_SECURITY_HANDLER(Code)(Java Doc)
protected COSDictionary encryptionDictionary(Code)(Java Doc)

Methods inherited from org.pdfbox.pdmodel.encryption.PDEncryptionDictionary
public COSDictionary getCOSDictionary()(Code)(Java Doc)
public String getFilter()(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public byte[] getOwnerKey() throws IOException(Code)(Java Doc)
public int getPermissions()(Code)(Java Doc)
public COSString getRecipientStringAt(int i)(Code)(Java Doc)
public int getRecipientsLength()(Code)(Java Doc)
public int getRevision()(Code)(Java Doc)
public byte[] getUserKey() throws IOException(Code)(Java Doc)
public int getVersion()(Code)(Java Doc)
public void setFilter(String filter)(Code)(Java Doc)
public void setLength(int length)(Code)(Java Doc)
public void setOwnerKey(byte[] o) throws IOException(Code)(Java Doc)
public void setPermissions(int permissions)(Code)(Java Doc)
public void setRecipients(byte[][] recipients) throws IOException(Code)(Java Doc)
public void setRevision(int revision)(Code)(Java Doc)
public void setSubFilter(String subfilter)(Code)(Java Doc)
public void setUserKey(byte[] u) throws IOException(Code)(Java Doc)
public void setVersion(int version)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.