RetainPageLayout Example VB

This example shows how various OCR input and output properties might be set prior to performing OCR on an image.

Private Sub cmdLayout_Click()
    'Set the OCR input options of the source file
    Imgocr1.Quality = wiAutoDetectQ
    Imgocr1.Layout = wiMultipleWithPictures
    Imgocr1.ProcessingMode = 1       'Process only OCR zones
    Imgocr1.RetainPictures = False   'Do not process pictures
    Imgocr1.RetainPageLayout = True  'Source layout retained in output layout    
    'Set the OCR output file to HTML type and open it in the associated application
    Imgocr1.OutputType = wiHTML
    Imgocr1.OutputFile = "d:\My Documents\ArticleText.html"
    Imgocr1.LaunchApplication = True    
    Imgocr1.StartOcr    
End Sub