Example code is for an older version of Toolkit, newer code is available.
<!-- Copyright (c) 2021 ActivePDF, Inc. -->
<!-- ActivePDF Toolkit 2017 -->
<!-- Example generated 01/16/21 -->
<%
Dim strPath, intOpenOutputFile, intMergeFile
strPath = Server.MapPath(".") & "\"
' Instantiate Object
Set oTK = Server.CreateObject("APToolkit.Object")
' Create the new PDF file
intOpenOutputFile = oTK.OpenOutputFile(strPath & "new.pdf")
If intOpenOutputFile <> 0 Then
ErrorHandler "OpenOutputFile", intOpenOutputFile
End If
' MergeFile is the equivalent of OpenInputFile and CopyForm
' Extract pages 3-4 from the PDF
intMergeFile = oTK.MergeFile(strPath & "10pages.pdf", 3, 4)
If intMergeFile <> 1 Then
ErrorHandler "MergeFile", intMergeFile
End If
' Close the new file to complete PDF creation
oTK.CloseOutputFile
' Release Object
Set oTK = Nothing
' Process Complete
Response.Write "Done!"
' Error Handling
Sub ErrorHandler(method, outputCode)
Response.Write("Error in " & method & ": " & outputCode)
End Sub
%>