Some test text!
Security on a PDF document protects the content from unauthorized access like copying or printing. PDF documents can be secured and encrypted using various encryption schemes. Control over document security in PDFTron SDK is performed through security handlers. Security handlers perform user authorization and sets various permissions over PDF documents. Although PDFTron SDK offers an extension mechanism through which users can register custom security handlers, it also provides a standard security handler.
This built-in security handler is the Standard Security Handler (StdSecurityHandler). The Standard Security Handler supports two passwords:
An application can also create its own implementation of SecurityHandler. For example, a custom SecurityHandler could perform user authorization requiring the presence of a hardware dongle or even feedback from a biometric system.
A Security Handler is used when:
The number of security handlers associated with a document change over time. When the document is first opened it isn't associated with any security handlers. When
InitSecurityHandler (or InitStdSecurityHandler) is called on the document, that security handler is associated with the document. And when
SetSecurityHandler is called on a document, that security handler is also associated with the document—albeit in a pending state until the document is saved. Until the document is saved with the new security handler, the old security handler rules the document's security.
A document may have both a current and a new security handler associated with it. A PDF document is not fully loaded in memory and decrypted when it is loaded. To fully decrypt the document, even after applying a new security handler, the original security handler is still required.
PDFTron SDK benefits include:
The security mechanism for the high-level document works in the same way as with an SDF document. To secure a document, use the
PDFDoc.SetSecurityHandler() method. To open a secured document, call
PDFDoc.InitSecurityHandler(). To open a document with a password, call
The following table lists security permissions available through the standard security handler:
|e_owner||All permissions are granted.|
|e_doc_open||A permission to open a document.|
|e_doc_modify||Modify the contents of the document.|
|e_print||Print the document.|
|e_print_high||Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this permission is not set, printing is limited to a low level representation of the appearance, possibly of degraded quality.|
|e_extract_content||Copy or otherwise extract text and graphics from the document.|
|e_mod_annot||Add or modify text annotations, fill in interactive form fields.|
|e_fill_forms||Fill in existing interactive form fields (including signature fields).|
|e_access_support||Extract text and graphics (in support of accessibility to disabled users or for other purposes).|
|e_assemble_doc||Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if e_doc_modify is not set.|
Besides providing full support for standard PDF security, PDFTron SDK allows users to work with custom security handlers and proprietary encryption algorithms. To define a custom security handler, derive a class from SecurityHandler and implement SecurityHandler's interface.
Securing a document with encryption
To secure a document with password protection and adjusting permissions on the document.
Reading a document with encryption
To read a document with password protection without user feedback.
Samples related to security.
APIs related to security.
A command-line tool that can be used for adding, removing, or changing security settings on existing PDF documents or whole directories of documents.
Get the answers you need: Support