See Also

Document Object

!UNRECOGNISED ELEMENT TYPE 'defaultmemberrequirements'!
OwnerPassword
Owner password.
UserPassword
User password.

Description

Sets a 40 bit PDF document security to the document with a user and owner password and returns a new StandardSecurity object.

Syntax

Public Function SetStandardSecurity( _
   ByVal OwnerPassword As String, _
   ByVal UserPassword As String _
) As StandardSecurity

Parameters

OwnerPassword
Owner password.
UserPassword
User password.

Return Type

A StandardSecurity object.

Example

[ASP - VBScript] 

<!-- METADATA TYPE="typelib" UUID="{DF9225FE-94A4-490D-8CAD-E8366CE621D3}"--> 
<%  
    Option Explicit 
    Dim MyDocument 
    Dim MyTable 
    Dim MyPage 
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) 
    Dim MyStandardSecurity 
    ' The owner and user password can be changed 
    Set MyStandardSecurity = MyDocument.SetStandardSecurity( "owner", "user" ) 
    Set MyPage = MyDocument.AddPage() 
    Set MyTable = MyPage.AddTable( 0, 0, 600, 600 ) 
    ' Add columns to the table 
    MyTable.AddColumn ( 150 ) 
    MyTable.AddColumn ( 90 ) 
    MyTable.AddColumn ( 90 ) 
    MyTable.AddColumn ( 90 ) 
    ' Add rows to the table and add cells to the rows.The values 000000 and 808080 represent black and Gray Color 
    Dim MyRow1 
    Set MyRow1 = MyTable.AddRow( DPDF_Font_HelveticaBold, 16 , "000000", "808080" ) 
    MyRow1.Align = DPDF_Align_Center 
    MyRow1.VAlign = DPDF_VAlign_Center 
    MyRow1.AddCell ( "Header 1" ) 
    MyRow1.AddCell ( "Header 2" ) 
    MyRow1.AddCell ( "Header 3" ) 
    MyRow1.AddCell ( "Header 4" ) 
    Dim MyRow2 
    Dim MyCell1 
    Set MyRow2 = MyTable.AddRow() 
    Set MyCell1 = MyRow2.AddCell ( "Rowheader 1", DPDF_Font_HelveticaBold, 16 , "000000", "808080", 1 ) 
    MyCell1.Align = DPDF_Align_Center 
    MyCell1.VAlign = DPDF_VAlign_Center 
    MyRow2.AddCell ( "Item 1" ) 
    MyRow2.AddCell ( "Item 2" ) 
    MyRow2.AddCell ( "Item 3" ) 
    Dim MyRow3         
    Dim MyCell2 
    Set MyRow3 = MyTable.AddRow() 
    Set MyCell2 = MyRow3.AddCell( "Rowheader 2", DPDF_Font_HelveticaBold, 16, "000000", "808080", 1 ) 
    MyCell2.Align = DPDF_Align_Center 
    MyCell2.VAlign = DPDF_VAlign_Center 
    MyRow3.AddCell ( "Item 4" ) 
    MyRow3.AddCell ( "Item 5" ) 
    MyRow3.AddCell ( "Item 6" ) 
    Dim MyRow4      
    Dim MyCell3 
    Set MyRow4 = MyTable.AddRow() 
    Set MyCell3 = MyRow4.AddCell( "Rowheader 3", DPDF_Font_HelveticaBold, 16, "000000", "808080", 1 ) 
    MyCell3.Align = DPDF_Align_Center 
    MyCell3.VAlign = DPDF_VAlign_Center 
    MyRow4.AddCell ( "Item 7" ) 
    MyRow4.AddCell ( "Item 8" ) 
    MyRow4.AddCell ( "Item 9" ) 
    MyDocument.DrawToWeb 
    Set MyPage = Nothing 
    Set MyDocument = Nothing 
%> 
 

See Also

Document Object

 

 


© Copyright 2007, ceTe Software