See Also

StandardSecurity Members  | ceTe.DynamicPDF Namespace

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents standard 40 bit PDF document security.

For a list of all members of this type, see StandardSecurity members.

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.Security
      ceTe.DynamicPDF.StandardSecurity

Syntax

[Visual Basic]
Public Class StandardSecurity    Inherits Security
[C#]
public class StandardSecurity : Security

Remarks

40 bit PDF security is compatible with PDF version 1.1 and higher and can be read with Adobe Acrobat version 3 and higher. For more details on standard 40 bit security take a look at the Security topic.

Example

The following example will set the standard security of the document so that the anyone who logs in with the user password will not be able to print, edit or copy the document or its contents.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule

    Sub Main()

        ' Create a PDF Document
        Dim MyDocument As Document = New Document

        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Create a standard security object
        Dim security As StandardSecurity = New StandardSecurity("owner", "user")

        ' Set the permissions on that security object
        security.AllowPrint = False
        security.AllowCopy = False
        security.AllowEdit = False

        ' Add the security object to the document
        MyDocument.Security = security

        ' Create and display a label as a reference
        Dim text As String = "This document has been encrypted with 40 bit encryption."
        MyPage.Elements.Add(New Label(text, 50, 50, 400, 100, Font.Helvetica, 18))

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
using ceTe.DynamicPDF.PageElements; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
 
        // Create a Page and add it to the document 
        Page page = new Page(); 
        document.Pages.Add( page ); 
 
        // Create a standard security object 
        StandardSecurity security = new StandardSecurity( "owner", "user" ); 
 
        // Set the permissions on that security object 
        security.AllowPrint = false; 
        security.AllowCopy = false; 
        security.AllowEdit = false; 
 
        // Add the security object to the document 
        document.Security = security; 
 
        // Create and display a label as a reference 
        string text = "This document has been encrypted with 40 bit encryption."; 
        page.Elements.Add( new Label( text, 50, 50, 400, 100, Font.Helvetica, 18 ) ); 
 
        // Save the PDF 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

StandardSecurity Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2006, ceTe Software