Image Viewer CP Gold SDK ActiveX

Image Viewer CP Gold SDK ActiveX

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

For Windows Developers who need to PDF TIFF Viewer and Image Viewer , plus support TIFF with WANG Annotations, securing a PDF document, add annotation with PDF for C++  , C#, VB.NET , VB, Delphi, Vfp, MS Access.

Popular Solution Go   Back

C# - How to extract barcode from pdf in c#

Step 1: To install the Image Viewer CP Gold SDK ActiveX, begin by launching the setup file (http://www.viscomsoft.com/demo/imageviewercpgoldsetupx.exe). Select the desired installation folder for the Image Viewer CP Gold SDK ActiveX and continue with the installation on your development computer.

Step 2: Create New Visual C# Project, select Windows Forms Application.

Step 3: The next step is to install Image Viewer CP Gold 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 Gold ActiveX Control , click OK. 


Step 5: From the Toolbox, drag the Image Viewer CP Gold ActiveX control to the Form.

Step 6: Add a button into the form.

Step 7: Add following code in button1 click event.

private void button1_Click(object sender, EventArgs e)
{
axImageViewer1.PDFUseAdvancedViewer=true;
AxImageViewer1.FileName="c:yourpdf.pdf";
}

 

Step 8: Add a button on form and named BtnReadBarcode.

Step 9: The UI like the following screen.

Step 10: Add following code in BtnReadBarcode click event.

 private void BtnReadBarcode_Click(object sender, EventArgs e)

        {

             short ibarcodeCount = 0;

             string str1;

             string strtmp;

             ibarcodeCount =axImageViewer1.BarCodeReadFullPage();


                  if (ibarcodeCount < 1)

                  {

                     MessageBox.Show("No barcode found");

                     return;

                  }


             str1 = "Total " ibarcodeCount.ToString() " BarCode detected" "rn";


                  for (short i = 0; i < ibarcodeCount ; i )

                  {

                      strtmp = axImageViewer1.BarCodeGetType(i) " score:" axImageViewer1.BarCodeGetScore(i).ToString() " value:" axImageViewer1.BarCodeGetValue(i).ToString();

                      str1 = str1 "rn" strtmp;

                  }


             MessageBox.Show(str1);

 

    }   

Download this sample source code.