New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

PDF417 - encoded string doesn't scan correctly


We have a problem identical to this one. The suggested solution doesn't work for us or we're missing something.

I'll try to provide an exact example of the input and the expected output.
Our government has a prescribed standard for PDF417 and mobile/internet banking that describes all the regulations involved.
This is the data from their prescribed "cookbook" inserted into the formula provided in your documentation:

StringVar DataToEncode := "HRVHUB30" + chr(10)
+ "HRK" + chr(10)
+ "000000000012355" + chr(10)
+ "ŽELJKO SENEKOVIĆ" + chr(10)
+ "IVANEČKA ULICA 125" + chr(10)
+ "42000 VARAŽDIN" + chr(10)
+ "2DBK d.d." + chr(10)
+ "ALKARSKI PROLAZ 13B" + chr(10)
+ "21230 SINJ" + chr(10)
+ "HR1210010051863000160" + chr(10)
+ "HR01" + chr(10)
+ "7269-68949637676-00019" + chr(10)
+ "COST" + chr(10)
+ "Troškovi za 1.mjesec" + chr(10);

stringVar CompleteBarcodeString:="";
numberVar EcLevel:=4;
numberVar TotalColumns:=9;
numberVar TotalRows:=0;
numberVar Truncated:=0;
numberVar PDFMode:=1;
numberVar ApplyTilde:=0;
numberVar i:=1;
numberVar Segments:= IDAutomationPDF417EncoderPDFSet(DataToEncode,EcLevel,TotalColumns,TotalRows,Truncated,PDFMode,ApplyTilde);
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationPDF417EncoderPDFGet(i);
);
CompleteBarcodeString

When I run this, it generates the barcode attached as the image "bad example.png". Everything scans ok, except that some of the special characters in the text are substituted with random characters and some are omitted, Ž comes out as }, č/ć/Č/ć are omitted, š comes out as a.
When I scan the "good example.png" (cropped from the before-mentioned cookbook) everything is scanned ok.

As a side note, this is just a prototype example with constant values. Our actual data is on an Oracle DB, with W-1250 encoding, and we're concerned that even if we got the example to work that the DB's encoding will also give us problems.

Operating System: Win10

Application: CR XI
Attachments:

03-27-19     5.6 year(s) ago    

  Report Abuse

 

Brant

Best Answer

The native formula instead of the UFL in Crystal Reports may give better results.

To encode special characters with any product in PDF417, ApplyTilde should be set to 0 and PDFMode should also be set to 0. When PDFMode is set to 0 everything is binary encoded. I also suggest that if that does not work you could set PDFMode to 1 and only encode ASCII 9, 10, 13, and 32 - 127. To encode UTF-8, refer to the UTF-8 Encoding FAQ.

If that does not work, ensure you are scanning the data with a scanner capable of reading and decoding binary data. With some scanners, this is only possible via the serial interface option with data bits set to 8N. Normally, keyboard wedges and USB scanners do not support extended characters above ASCII 128. Contact the scanner vendor for more information; some of the scanner’s internal settings may have to be modified. More information about decoding in this way is provided in the UTF-8 FAQ.

Posted 5.6 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (3)
Alas, the specification is available only in Croatian.

I've translated this summary table. Data input is listed in the initial post. That's pretty much the gist of it. The rest of the spec is legal mumbo-jumbo.
image

We're gonna give it a shot with the native formula approach. If you have any further suggestions feel free to give them, otherwise, we'll let you know if the native formulas help.

Thanks for the help provided so far.

Cheers!
Tom

Posted 5.6 year(s) ago

(0)
(0)
   Report Abuse
Ok :) we're getting somewhere. ApplyTilde and PDFMode set to 0 give me šŠ and žŽ, but no čČ, ćĆ, and đĐ.

We can't apply your suggestion about limiting the chars to ASCII 9, 10, 13, and 32 - 127 because this is a "legal document" and we can't just replace chars like ŽELJKO SENEKOVIĆ to ZELJKO SENEKOVIC, because of.... legal stuff...

Also, this gem of a table comes at the end of the standard specification. It looks like someone thought it would help in this particular problem but didn't go too deep into details, and we have absolutely no idea how to utilize it.

___________utf-8
Symbol____Hex
Č_______C4 8C
č_______C4 8D
Ć_______C4 86
ć_______C4 87
Đ_______C4 90
Ċ_______C4 91
Š_______C5 A0
š_______C5 A1
ž_______C5 BD
Ž_______C5 BE

I've tried substituting Č with ChrW(50316) - gibberish, Chr(196) + Chr(140) - also gibberish.. And many more combinations, all to no avail... We believe that we should substitute these characters with something but we got no idea what...

We're sure that this can be done, because of the "good example.png" from the 1st post, the one snipped from the standard specification. They don't mention the technology they used to create the barcode, but our whole reporting system is built in Crystal Reports and we can't believe that this can't be done in it...

Posted 5.6 year(s) ago

(0)
(0)
   Report Abuse
We've tried experimenting with ApplyTilde and PDFMode in all combinations. No result. Are there any other factors we're not aware of?

As this will be used in eBanking, the only possible and available scanner is a banking mobile app, and as I already said - the app scans a good example and the scanned data is 100% as the one listed in the code, and the same app scans the generated barcode with the above-listed faults.

Posted 5.6 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook