Example code is for an older version of Toolkit, newer code is available.
' Copyright (c) 2021 ActivePDF, Inc.
' ActivePDF Toolkit 2017
' Example generated 01/23/21
Imports System
' Make sure to add the ActivePDF product .NET DLL(s) to your application.
' .NET DLL(s) are typically found in the products 'bin' folder.
Public Class Examples
Sub Example()
Dim strPath As String, strAuthor As String, strTitle As String, strSubject As String, _
strKeywords As String, strProducer As String, strCreator As String, strCreateDate As String, _
strModDate As String
strPath = AppDomain.CurrentDomain.BaseDirectory
' Instantiate Object
Dim oTK As APToolkitNET.Toolkit = New APToolkitNET.Toolkit()
' Specify the file to retrieve information about
oTK.GetPDFInfo(strPath & "PDF.pdf")
' Retrieve various information about the PDF
strAuthor = oTK.Author
strTitle = oTK.Title
strSubject = oTK.Subject
strKeywords = oTK.Keywords
strProducer = oTK.Producer
strCreator = oTK.Creator
strCreateDate = oTK.CreateDate
strModDate = oTK.ModDate
' Close the PDF as it's no longer needed
oTK.CloseInputFile()
' Release Object
oTK.Dispose()
' Process Complete
WriteResults("Done!")
End Sub
' Write output data
Sub WriteResults(content As String)
' Choose where to write out results
' Debug output
'System.Diagnostics.Debug.WriteLine("ActivePDF: * " + content)
' Console
Console.WriteLine(content)
' Log file
'Using tw = New System.IO.StreamWriter(AppDomain.CurrentDomain.BaseDirectory & "application.log", True)
' tw.WriteLine("[" + DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss") + "]: => " + content)
'End Using
End Sub
End Class