Example code is for an older version of Toolkit, newer code is available.
<!-- Copyright (c) 2019 ActivePDF, Inc. -->
<!-- ActivePDF Toolkit 2017 -->
<!-- Example generated 12/15/19 -->
<%
Dim strPath, intOpenInputFile, strPropertyValue
strPath = Server.MapPath(".") & "\"
' Instantiate Object
Set oTK = Server.CreateObject("APToolkit.Object")
' Open the PDF to read from
intOpenInputFile = oTK.OpenInputFile(strPath & "XMPproperties.pdf")
If intOpenInputFile <> 0 Then
ErrorHandler "OpenInputFile", intOpenInputFile
End If
' Get the reference to the XMP object
Set oXMP = oTK.GetXMPManager()
' Get a document property
strPropertyValue = oXMP.GetDocumentProperty(2)
Response.Write(strPropertyValue)
' Get a custom property
strPropertyValue = oXMP.GetCustomProperty("example")
Response.Write(strPropertyValue)
' Set the namespace for the user property
oXMP.SetNamespace "dc", "http://purl.org/dc/elements/1.1/"
' Get a user property
strPropertyValue = oXMP.GetUserProperty("contributor")
Response.Write(strPropertyValue)
' Release Object
Set oXMP = Nothing
' Close the input file
oTK.CloseInputFile
' Release Object
Set oTK = Nothing
' Process Complete
Response.Write "Done!"
' Error Handling
Sub ErrorHandler(method, outputCode)
Response.Write("Error in " & method & ": " & outputCode)
End Sub
%>