Shown below is the original code. I am splitting pdfs and image files into pages of Tifs and users then select the ones they want. These are then combined into a single file. The files are currently all lzw and the file sizes are huge.
I've tried adding AxImaging1.ConvertTo1Bpp() after the SetNativeImage line and adding a ,4 to the TiffSaveAsNativeMultiPage call but it still ends up as lzw.
I would also like to know if there is a quicker way to do this, this seems to be slow. We currently have students scanning the contents of a lot of filing cabinets and combining then for a document imaging system and they are finding the process too slow and I am finding it fills up my server too quickly.
I would really appreciate some help on this. I've read through many posts on the same subject, but they are all just a bit different and with so many functions available I can't see how I can apply them to my case.
Code: Select all
For i As Integer = 0 To ListView1.Items.Count - 1
AxGdViewer1.DisplayFromFile("c:\overdrive\page" & ListView1.Items.Item(i).Tag + 1 & ".tif")
If jFirstpass Then
jFirstpass = False
AxImaging1.SetNativeImage(AxImaging1.CreateClonedImage(AxGdViewer1.GetNativeImage))
Call AxImaging1.TiffSaveAsNativeMultiPage(cOutputFileName)
Else
Call AxImaging1.TiffAddToNativeMultiPage(AxGdViewer1.GetNativeImage)
End If
Next
AxImaging1.TiffCloseNativeMultiPage()
Code: Select all
nImageID = AxImaging1.CreateImageFromFile(cFileName)
If nImageID <> 0 Then
For nCpt = 1 To jPageCount
If cFileExt = "tif" Then
AxImaging1.TiffSelectPage(nImageID, nCpt)
End If
K = AxImaging1.SaveAsTIFF("c:\overdrive\page" & jImageCounter & ".tif")
jImageCounter = jImageCounter + 1
Next nCpt
End If
If nImageID <> 0 Then J = AxImaging1.CloseImage(nImageID)