Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Mon Feb 10, 2020 7:01 pm

How to you restrict the barcode scanning to the first page only in a multi page tiff document?

vdibernardo
 
Posts: 3
Joined: Sun Feb 09, 2020 11:56 pm

Tue Feb 11, 2020 3:25 am

Hi,

Thanks for your inquiry.
Sorry that there is no direct way to scan only the first page of a multi page tiff document. But we provide a method which could scan the barcode in specific area. For tiff file, the position is for the first page by default. Please refer to following code:
Code: Select all
BarcodeScanner.scan(bufferedImage, Rectangle, BarCodeType);

And there is another workaround, that is splitting the tiff to individual images by yourself, then use Spire to scan the first page image.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Feb 11, 2020 5:52 pm

okay . is it possible to end the scan operation after encountering one barcode ?

vdibernardo
 
Posts: 3
Joined: Sun Feb 09, 2020 11:56 pm

Wed Feb 12, 2020 2:16 am

Hi,

There is a method scanOne which could scan one barcode.
Code: Select all
BarcodeScanner.scanOne("data/cx2.tif");


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.BarCode