Example code is for an older version of Toolkit, newer code is available.
<!-- Copyright (c) 2021 ActivePDF, Inc. -->
<!-- ActivePDF Toolkit 2017 -->
<!-- Example generated 04/20/21 -->
<%
Dim strPath, intDecryptPDF
strPath = Server.MapPath(".") & "\"
' Instantiate Object
Set oTK = Server.CreateObject("APToolkit.Object")
' Toolkit can directly encrypt an existing PDF file
' !NOTE: Evaluation keys will append 'DEMO' to the start of the password
' Remove the encryption from the specified PDF
intDecryptPDF = oTK.DecryptPDF(strPath & "Encrypted.pdf", strPath & "Decrypted.pdf", "UserPassword", "OwnerPassword")
If intDecryptPDF <> 0 Then
ErrorHandler "DecryptPDF", intDecryptPDF
End If
' Release Object
Set oTK = Nothing
' Process Complete
Response.Write "Done!"
' Error Handling
Sub ErrorHandler(method, outputCode)
Response.Write("Error in " & method & ": " & outputCode)
End Sub
%>