I am attempting to convert a pdf file to a tif file using ImageMagick from within a VB6 application. Everytime I try it, however, I get the following error message: Method 'Convert' of object 'IMagickImage' failed.
My code is as follows:
Code: Select all
Dim InputFile As Variant
Dim OutputFile As Variant
Dim imo As ImageMagickObject.MagickImage
InputFile = "C:\input.pdf"
OutputFile = "C:\output.tif"
Set imo = CreateObject("ImageMagickObject.MagickImage.1")
imo.Convert InputFile, OutputFile
I am able to get this to work from a command line by typing Convert input.pdf output.tif, but I would like to get this working from within a VB6 application.
Any help would be greatly appreciated.
Reagan