GetCompressionPreference Example VB

This example demonstrates how to read and retain all current compression settings. In the event that another application makes changes to these settings at runtime, the saved values can be restored.

Private Sub cmdGetCompression_Click()
    'Option Base 1
    Dim lngCompInfo(6) As Long
    Dim intCompType(6) As Integer
    Dim intCompPref, intImgType As Integer 
    CompPref = ImgScan1.GetCompressionPreference
    'Using intImgType to loop through 6 times (for each page type)
    'and also as the input parameter to the methods.
    For intImgType = 1 To 6
        intCompType(intImgType) = 
            ImgScan1.GetPageTypeCompressionType(intImgType)
        lngCompInfo(intImgType) = 
            ImgScan1.GetPageTypeCompressionInfo(intImgType)
    Next intImgType
End Sub