c# - How to find barcodes of a PDF document -


i started searching how create windows phone 8 app recognize barcodes inside pdf document.

my best guest following process below:

  1. find lib split pdf documents image streams (one per page).
  2. find lib recognize if there barcode in image stream:

    2.1. try recognize barcode in each portion of image, i. e.:

    try #1 (from y = 0, x = 0 y = 100, x = 100);

    try #2 (from y = 100, x = 0 y = 200, x = 100);

    try #3 (from y = 200, x = 0 y = 300, x = 100);

    and on.

i'm wondering if best approach accomplish barcode recognition in pdf document using wp8.

another concern whether process when executed not device present acceptable performance.

someone did that? advice?

update

i want scan itf barcodes, i. e., need scan barcode in image: enter image description here

i'm trying start achieving scanning barcodes image, i'm not getting success. below first try:

        //get assets folder app         storagefolder folder = await windows.applicationmodel.package.current.installedlocation.getfolderasync("assets");          bitmapsource bitmapsource = await getbitmapimage(folder, "barcode.png");         writeablebitmap writeablebitmap = new writeablebitmap(bitmapsource);          var rgb = new rgbluminancesource(writeablebitmap.tobytearray(), writeablebitmap.pixelwidth, writeablebitmap.pixelheight);         var hybrid = new hybridbinarizer(rgb);         binarybitmap binbitmap = new binarybitmap(hybrid);          reader reader = new itfreader();          try         {             result result = reader.decode(binbitmap);             if (result != null)             {                 this.textblock.text = result.text;             }         }         catch (exception ex)         {             this.textblock.text = ex.message;         } 

unfortunately, text box being filled exception:

        exception of type 'com.google.zxing.readerexception' thrown. 

i'm using "lib": https://silverlightzxing.codeplex.com/

yes, concept works.

  • read pdf image
  • after use external library detect barcodes image. (there many libraries available so)

and concern mentioned regarding performance of low-end devices, depends on many things.

  • first of depends on library use convert pdf image
  • then library use detect barcode image.

though there no certainity time complexity in task, think not take time required..! it's general process, can go scenario above.

hope helps...


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -