Example code is for an older version of Toolkit, newer code is available.
<!-- Copyright (c) 2021 ActivePDF, Inc. -->
<!-- ActivePDF Toolkit 2017 -->
<!-- Example generated 03/02/21 -->
<%
Dim strPath, intOpenOutputFile, arrayFiles, intMergeFiles
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
' Set whether the fields should be read only in the output PDF
' 0 leave fields as they are, 1 mark all fields as read-only
' Fields set with SetFormFieldData will not be effected
oTK.ReadOnlyOnMerge = 1
' Create array of the file paths to merge
arrayFiles = array(strPath & "cover.pdf", strPath & "5pageLI.pdf", strPath & "6pageAA.pdf")
' MergeFiles is the equivalent of calling OpenInputFile and CopyForm
' for each PDF in the attray.
intMergeFiles = oTK.MergeFiles(arrayFiles)
If intMergeFiles <> 1 Then
ErrorHandler "MergeFiles", intMergeFiles
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
%>