Image Viewer CP SDK ActiveX

Image Viewer CP SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to Fax, image viewer in c#, c , , vb, delphi, vfp, MS Access.

Popular Solution Go   Back

VB.NET - How to create searchable PDF from image in VB.Net Sample

Step 1: To install the Image Viewer CP ActiveX Control, begin by launching the setup file (imageviewercpsetup.exe). Select the desired installation folder for the Image Viewer CP ActiveX and continue with the installation on your development computer. 

Step 2: Create New Visual Basic Project, select Windows Application.

Step 3: The next step is to install Image Viewer CP ActiveX in ToolBox. Select Toolbox, select Components item, right click mouse button, select Choose Items...

Step 4: Select COM Components tab, select Image Viewer CP ActiveX Control , click OK.

Step 5: Add a buttons on form.

Step 6: Add following code in buttons click event. Assume you have source.jpg in c:\

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim iResult As Integer

        Dim iLangIndex As Integer

        Dim iMode As Integer

        iLangIndex = 0

        AxImageViewer1.OCRRecognizeMode = iMode

        AxImageViewer1.FileName = "c:\source.jpg"

        AxImageViewer1.OCRSetRect(0, 0, 0, 0)

        iResult = AxImageViewer1.OCR2SearchablePDF("c:\youroutputfolder\searchablepdf.pdf", iLangIndex, "dictfiles")

End Sub

Step 7: It will output single searchable PDF file. A searchable PDF is simply a PDF with multiple layers. The top layer is the original image as it was scanned in. Under that layer is a layer of text accurately positioned so that each word is directly behind the pixels that represent the word.
If your source file is multipage TIFF file, you want to output multipage searchable PDF file, you may call OCR2SearchableMultipagePDF method. In this sample, it use our OCR plugin to OCR the document to create a Searchable PDF. Remember if you want to output searchable PDF file, you need buy our OCR plugin.

 Step 8: Download the sample source code from