Read Barcode from PDF in PHP using Aspose.Barcode REST API

Hi,

I’m using a demo account to test my application. I have had good success so far but when I got to trying to test the barcode reader class I am getting this error:

Is this not available with free version? How can I test reading barcodes with a demo version (using PHP SDK)

Fatal error: Uncaught exception ‘Exception’ with message ‘{“Message”:“Your have processed ‘0’ barcodes. Your pricing plan allows only ‘0’ barcodes.”}’ in

Hi Clint,


Thank you for contacting support. You’re right. I can notice this error message. We’re working over your query and will get back to you soon.

Hi Clint,


It is to update you that we have logged this issue under ticket id SAASWEBCORE-2026 in our issue tracking system. We’ll keep you informed regarding any updates.

Thanks. I haven’t heard from anyone yet? My client is really wanting to know if this product is going to work. I need to know if I upgrade to the full version that I’m not going to receive this error. Is this just an artifact of the demo account license?

Hi Clint,


Thank you for being patient. This issue (SAASWEBCORE-2026) has been fixed. Please continue testing Aspose.BarCode for Cloud API again and let us know in case of any problem or confusion.

Thanks. I did test this and I was able to decode my bar codes. However, something is not quite right.



Below is the output after processing the pdf file (attached to this post). My code loops through the images in the pdf and does this for each image:



try{

//initialize BarCodeReader object

$reader = new BarcodeReader($file_name);

//read barcode image and get a list of barcodes

$barcodes = $reader->Read($bc_format);

foreach ($barcodes as $barcode) {

echo "Type: " . $barcode->BarcodeType . " Text: " . $barcode->BarcodeValue . “
”;

}

}catch (Exception $e) {throw new Exception($e->getMessage());}



output :



Type: Code93Standard Text: 1260M6

Type: Code93Standard Text: 1259TS



Expected output:

Type: Code93Standard Text: 1260

Type: Code93Standard Text: 1259



What is the reason for the extra 2 characters at the end: ‘M6’ & ‘TS’ ?



It doesn’t seem like there is anything wrong with the bar code images because I uploaded the one called: TestPDFAspose_2.png (also attached to this post) to :

Barcode Reader. Free Online Web Application



and it gave the output as ‘1260’ as expected…

Hi Clint,

Thank you for your inquiry.
zmoddynamics:
output :

Type: Code93Standard Text: 1260M6

Type: Code93Standard Text: 1259TS
Expected output:
Type: Code93Standard Text: 1260
Type: Code93Standard Text: 1259
What is the reason for the extra 2 characters at the end: ‘M6’ & ‘TS’ ?

It doesn’t seem like there is anything wrong with the bar code images

These two extra characters at the end are known as checksum digits. Our cloud service is concatenating code text and checksum digits and then returning a barcode value. I’ve logged a feature request to provide these two values separately. This feature has been logged under ticket id SAASBARCODE-44 in our issue tracking system. Your request has also been linked to the issue. We’ll keep you informed regarding any updates. We’re sorry for your inconvenience.

Thanks. Please do inform me when the issue is resolved. I can continue testing my application for now by just removing the last two characters…

However, I was hoping you can please reset my demo account because I have managed to exceed the number of documents I can process.

Fatal error: Uncaught exception ‘Exception’ with message ‘{“Message”:“Your have processed ‘102’ documents. Your pricing plan allows only ‘100’ documents.”}’ in

Hi Clint,


Sure, we’ll keep you informed. Could you please provide us the email id you used when you registered for your Aspose cloud account? It will help us to process your request.

Hi Clint,


From the specifics of ticket id SAASBARCODE-44, as a workaround, you can use additional parameter in our service named as “checksumValidation”, if this is ON (default value in Aspose.Barcode depends on barcode symbology). You will get only clean barcode value in current implementation of service, so you may try to use this parameter to get clean barcode value now.

Please refer to the following help topic: Recognize Barcode with Checksum Option from Storage

PS: Our latest code base supports this feature. Since the initial tests are passed. We need to integrate this fix with the live Aspose for Cloud service.

Sure. Email is clint.zeringue@zmoddynamics.com

Hi Clint,


Thank you for being patient. Your account limit is now reset. Please continue testing Aspose.BarCode for Cloud API and let us know in case of any problem or confusion.

Thanks, but I’m still getting the following error when trying :

$image_format = “png”;

$file_name = basename($file_path);

try{

//initialize Extractor object

$extractor = new Extractor($file_name);

//get # of images on page

return $extractor->getImageDefaultSize($page_num, $image_num, $image_format);

} catch (Exception $e) {throw new Exception($e->getMessage());}



Fatal error: Uncaught exception ‘Exception’ with message ‘{“Message”:“Your have processed ‘102’ documents. Your pricing plan allows only ‘100’ documents.”}’ in /home/content/10/9442310/html/test/testAsposePDF.php:88 Stack trace: #0 /home/content/10/9442310/html/test/testAsposePDF.php(153): saveLocalImage(‘TestPDFAspose.p…’, 1, 1) #1 /home/content/10/9442310/html/test/testAsposePDF.php(166): get_pdf_parse_data(‘TestPDFAspose.p…’) #2 {main} thrown in /home/content/10/9442310/html/test/testAsposePDF.php on line 88

Hi Clint,


Thank you for the details. We’ve reset it again. Please recheck now and see if the problem persist. In case, it is not resolved yet, then please share your App SID and App Key. We’ll look into the matter and guide you accordingly.

Also, please note that this information is confidential, so make a zip file of your confidential information and provide us through private message.
We're looking forward to helping you.

Hi. Thanks. It appears to be resolved now. I do have an error coming up when trying to split a pdf. I am not sure if this is on my end or your end. Can you tell from the following error message:

splitting pdf from: 1 to: 2
Fatal error: Uncaught exception ‘Exception’ with message ‘{“Message”:“Error ‘AmazonS3 exception: The specified key does not exist.’, Path ‘1260M6_5388a472ebe49.pdf’”}’ in /home/content/10/9442310/html/test/testAsposePDF.php:128 Stack trace: #0 /home/content/10/9442310/html/test/testAsposePDF.php(181): splitPDF(‘1260M6_5388a472…’, 1, 2) #1 {main} thrown in /home/content/10/9442310/html/test/testAsposePDF.php on line 128

Hi. This was on my end. I have resolved the issue. Everything appears to work great! My client will be purchasing the service shortly. I really appreciate all the help getting started.

6 posts were split to a new topic: Merge multiple PDF Documents with Aspose.PDF SDK for PHP

The issues you have found earlier (filed as SAASWEBCORE-2026) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.