This code sample requires a reference to the toolbox to work.
Dim mydemo As New ToolBox.PDFTools.PDFFooterWriter(My.Computer.FileSystem.SpecialDirectories.Desktop & "\output.pdf")
mydemo.inputfile = My.Computer.FileSystem.SpecialDirectories.Desktop & "\sourcefile.pdf"
mydemo.footertext = "Page: " ' --- Footer text
mydemo.append_pagenumber = True ' --- We want a page number added in the footer
mydemo.centerfooter = True ' --- Center the footer on the page
mydemo.disableborder = True ' --- Disable the line at the top and bottom of the footer
mydemo.startpagenumber = 2 ' --- Start page numbering at 2 (optional)
Try
mydemo.SetFooter() ' --- Process the document and add the page numbers
Catch ex As Exception
MsgBox("oops, error: " & ex.ToString)
End Try
MsgBox("Done!")