Conversion of an array of images into a single image...
Posted: 2009-02-24T15:25:18-07:00
Hello Everyone.
I apologize if this has been covered elsewhere on the forums. I have not been able to locate info pertaining to my issue and am stumped.
I am accessing a directory via System.IO in a VB.net application that returns an array of the filenames of all TIFFs in said directory. I can convert those TIFFs to single PDFs with no issue, but I'd like to give the users the option to merge them under a single PDF. Unfortunately, I either get an exception or a null return. Ex.:
From my last run:
I am quite a beginner at this, so any help would be greatly appreciated. Also, if anyone has any good links on Exception Handling for the COM object, I could definitely use that too.
I apologize if this has been covered elsewhere on the forums. I have not been able to locate info pertaining to my issue and am stumped.
I am accessing a directory via System.IO in a VB.net application that returns an array of the filenames of all TIFFs in said directory. I can convert those TIFFs to single PDFs with no issue, but I'd like to give the users the option to merge them under a single PDF. Unfortunately, I either get an exception or a null return. Ex.:
Code: Select all
Dim imo as ImageMagickObject.MagickImage
Dim filelist As String
Dim result As String
If merge_tif = True Then
filelist = ""
For Each file As FileInfo In Files
filelist = filelist & "," & file.fullname
System.Threading.Thread.Sleep(1000)
Next
filelist = filelist.TrimStart(",")
imo = CreateObject("Imagemagickobject.MagickImage.1")
result = imo.Convert(filelist,dest_dir & "\" & merge_file & ".pdf")
imo = Nothing
Else
- filelist = "C:\TIF2PDF\file1.tif,C:\TIF2PDF\file2.tif"
dest_dir & "\" & merge_file & ".pdf" = "C:\TIF2PDF\merged.pdf"
I am quite a beginner at this, so any help would be greatly appreciated. Also, if anyone has any good links on Exception Handling for the COM object, I could definitely use that too.