BarCodeReader Class with PDF Cloud Product


#1

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


#2

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.


#3

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.


#4

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?


#5

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.


#6

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 :

http://online-barcode-reader.inliteresearch.com/default.aspx



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


#7
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.


#8

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


#9

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.


#10

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.


#11

Sure. Email is clint.zeringue@zmoddynamics.com


#12

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.


#13

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


#14

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 email. Please refer to the following steps:
http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx

We’re looking forward to helping you.


#15

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


#16

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.


#17

Also, one other subtle point. If I want to create say 2 new pdf documents from a master pdf like:

master.pdf : 4 pages

master1.pdf : pages 1-2

master2.pdf: pages 3-4

Do I need to first ‘split’ master.pdf into 4 individual pages and then merge each set of 2 into another or is there some shortcut method like:

createnewpdf(‘master.pdf’,1,2) ?
createnewpdf(‘master.pdf’,3,4)


#18

Hi Clint,


Thank you for asking about this feature support. Yes, there is a shortcut. You can split a PDF document by a range of pages. The split resource accepts “from” and “to” parameters to define a range of pages.

Please have a look over these helping techniques: Split PDF Files
You need to scroll down the page and see a sub example named as "Split specific pages to new PDFs"

Please feel free to reply us in case of any confusion or questions.


#19

Hi. I believe that is the function I am using but it seems to create two ‘separate’ pdfs when I run my code:



[[

Here is the code (using php sdk)



try{

//initialize Document object

$doc = new Document(‘TestPDFAspose.pdf’);

$result = $doc->splitPages(3, 4);



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



]]





This created ‘two’ separate pdf files on my server named TestPDFAspose_pdf_1.pdf & TestPDFAspose_pdf_2.pdf



The contents of TestPDFAspose_pdf_1 was page 3 from TestPDFAspose.pdf and the contents of TestPDFAspose_pdf_2 was page 4 from TestPDFAspose.pdf ???



But what I want is a single new pdf document that has the contents of page 3 and page 4…


#20

Hi Clint,


Thank you for these details. I’m sorry about the confusion. For now as a workaround, you can split PDF pages individually and then merge them, as stated in the following help topic: Merge Multiple PDF Files

I’ve logged a feature request to achieve this task in a single API request. This feature has been logged under ticket id SAASPDF-123 in our issue tracking system. We’ll let you know once it is supported. We’re sorry for your inconvenience.