FYI: We're upgrading our website look and feel over the next 30 days. This page will be done soon!
Empower yourself with Document to Image Conversion Tools from Softinterface.

Product Navigation
Click for the BBB Business Review of this Computers Hardware, Software & Services in Santa Monica CA

'Convert Document to Image' COM/ActiveX Interface

Using 'Convert Document to Image' as an ActiveX Component


For COM+ (i.e. with IIS) users click here.

One very important note is that CDTI.EXE is both an executable application AND an ActiveX component.  That is, the file, CDTI.EXE, can be ran as a stand alone application, and, can also be referenced as a component within your development environment.

In development environments such as VBA you may use something similar to the lines of code below to create an instance of the 'Convert Document To Image' application object:

  Dim oCDTI As ConvertDocToImage.clsConvertDocToImage

  Set oCDTI = CreateObject("ConvertDocToImage.clsConvertDocToImage")

  Call oCDTI.DoCommandLine("/JE:\Jobs\Test.SII")

Directly below is some VBS (Visual Basic Script). You could put the following 2 lines in a text file, call it Test.VBS and give it a go:

   Set converter = WScript.CreateObject("ConvertDocToImage.clsConvertDocToImage")
   Call converter.DoCommandLine("

For Visual Basic users, simply make a reference to the CDTI.EXE file in the Tools\References menu item. Once done you will have access to the ConvertDOCtoImage component. Here is some sample code illustrating its usage.

To download sample applications click the following links:

Private Sub Command1_Click()

  Dim lRetVal As Long

  Dim oCDTI As ConvertDocToImage.clsConvertDocToImage


  Set oCDTI = New ConvertDocToImage.clsConvertDocToImage

' Assign Key To the 'Final Key', given upon purchase/registration.

  oCDTI.Key = ""


  ' Run by the command line.  See documentation for a full listing of

  ' switches and options. Switches are CASES SENSITIVE


  ' Convert Coffee.PDF to Coffee.JPG.

  '   Verbose output with /V. Remove /V to make it completely silent.

  '   Specify the input (/S) and output files (/T),

  '   the JPG format (/C1) of the target image file,

  '   also specify which page(s) to do with /1 * (in this case all),

  '   and the resolution with /5 (in this case 200 DPI),

  '   JPEG Quality 90% with /4:


 lRetVal = oCDTI.DoCommandLine("/S C:\Input\Coffee.PDF /T C:\Output\Coffee.JPG /C1  /1 * /4 90 /5 200 /V")


'  Example of specifying a 'Conversion Job File'

  lRetVal = oCDTI.DoCommandLine("/j""C:\Test\ConversionJob.sii""")


' DoCommandLine() Return Values

'  0 = Success

' -1 = Shareware expired

' -2 = Command line String Empty or invalid

' -3 = Missing required or invalid command line argument(s)


  If (lRetVal = 0) Then

    MsgBox ("Success!")


    MsgBox ("Failure.")

  End If


  Set oCDTI = Nothing

End Sub

As you can see from the code above, the ActiveX simply wraps the command line feature. So, to learn what you can do with the ActiveX, please refer to the 'Using the Command Line' section of the 'Convert Document To Image' user manual.  Also, you will have to change the path information in the DoCommandLine() method for your particular set of files you are converting.




      This function emulates doing the command line, but through the COM interface.

         0 = Success
        -1 = Shareware expired
        -2 = Command line String empty or invalid
        -3 = Missing required command line argument(s)