Image Viewer CP Gold SDK ActiveX

Image Viewer CP Gold SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, 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: Download Image Viewer CP Gold ActiveX setup disk and installed it.

Step 2: Add a buttons into the form.

Step 3: Add following code in buttons click event.

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

 

Step 4: Add a buttons name BtnReadBarcode into the form.

Step 5: Add following code in buttons 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" "\r\n";

      for (short i = 0; i < ibarcodeCount ; i )
      {
          strtmp = axImageViewer1.BarCodeGetType(i) " score:" axImageViewer1.BarCodeGetScore(i).ToString() " value:" axImageViewer1.BarCodeGetValue(i).ToString();
          str1 = str1 "\r\n" strtmp;
      }

 MessageBox.Show(str1);

}