Attribute VB_Name = "basMain" Option Explicit Public Sub Main() Debug.Print ("---------------------------------------------------------") Debug.Print ("PDFTron PDF2Image Test") Debug.Print ("Copyright (c) 2003-2008 PDFTron Systems Inc.") Debug.Print ("---------------------------------------------------------") Dim ret As Integer ret = PDF2ImageInit("John Doe", "My Company", "my license key", ByVal 0&) ret = PDF2ImageRun("-f png -o ../TestOutput/test1 ../../samples/TestFiles/tiger.pdf", ByVal 0&, ByVal 0&) If (ret = 0) Then Debug.Print ("Done [OK].") ElseIf (ret = PDF2IMAGE_ERR_DIRCREATE) Then Debug.Print ("ERROR: Creating the output file/directory.") ElseIf (ret = PDF2IMAGE_ERR_READINGPDF) Then Debug.Print ("ERROR: Reading input document.") ElseIf (ret = PDF2IMAGE_ERR_PASSWORD) Then Debug.Print ("ERROR: Password required to open PDF.") ElseIf (ret = PDF2IMAGE_ERR_CONVERT) Then Debug.Print ("ERROR: Conversion error.") Else Debug.Print ("ERROR: Other error.") End If End Sub