I was playing around with a barcode generator for one of my projects, and I realized that I get 2 different barcodes when I key in the same value on 2 different websites.
e.g. Keying in the value "0" on https://www.cognex.com/resources/interactive-tools/free-barcode-generator would result in a different spacing as compared to key in "0" on the website https://barcode.tec-it.com/en/?data=0.
I'm wondering why that is the case
I think the reason might be due to one website using code128A, and the other website using code128B, resulting in a different barcode, yet having the same value. Feel free to correct me if I'm wrong.
Related
I am trying to set up a label template for a Zebra printer that has 4 variables containing different pieces of information, FN1, FN2, FN3, and FN4. These 4 variables are printed to text and barcode fields on the label, however I also want to concatenate them together to create a single data matrix containing the data in all 4 variables.
I have tried inserting line breaks using \& as suggested on page 144 of the documentation but this does not seem to have any effect. The code for the field data I'm trying to use is shown below.
^FH\^FN1\&^FN2\&^FN3\&^FN4^FS
Only the content of the last variable in the list (FN4, in that case) is encoded into the data matrix, the rest are ignored. I suspect I'm missing something fairly straightforward, but have not been able to find any articles relating to this exact problem.
For anyone else looking for this kind of solution, I have received confirmation from Zebra that this is unfortunately not currently (as at 01/02/2023) possible in ZPL. You should be able to implement it with ZBI, but this is quite a different approach and requires compatible hardware.
I am generating and storing PDFs in a database.
The pdf data is stored in a text field using Convert.ToBase64String(pdf.ByteArray)
If I generate the same exact PDF that already exists in the database, and compare the 2 base64strings, they are not the same. A big portion is the same, but it appears about 5-10% of the text is different each time.
What would make 2 pdfs different if both were generated using the same method?
This is a problem because I can't tell if the PDF was modified since it was last saved to the db.
Edit: The 2 pdfs visually appear exactly the same when viewing the actual pdf, but the base64string of the bytes are different
Two PDFs that look 100% the same visually can be completely different under the covers. PDF producing programs are free to write the word "hello" as a single word or as five individual letters written in any order. They are also free to draw the lines of a table first followed by the cell contents, or the cell contents first, or any combination of these such as one cell at a time.
If you are actually programmatically creating the PDFs and you create two PDFs using completely identical code you still won't get files that are 100% identical. There's a couple of reasons for this, the most obvious is that PDFs support creation and modification dates. These will obviously change depending on when they are created. You can override these (and confuse everyone else so I don't recommend this) using something like this:
var info = writer.Info;
info.Put(PdfName.CREATIONDATE, new PdfDate(new DateTime(2001,01,01)));
info.Put(PdfName.MODDATE, new PdfDate(new DateTime(2001,01,01)));
However, PDFs also support a unique identifier in the trailer's /ID entry. To the best of my knowledge iText has no support for overriding this parameter. You could duplicate your PDF, change this manually and then calculate your differences and you might get closer to a comparison.
Then there's fonts. When subsetting fonts, producers create a unique internal name based on the original name and an arbitrary selection of six uppercase ASCII letters. So for the font Calibri the font's name could be JLXWHD+Calibri one time and SDGDJT+Calibri another time. iText doesn't support overriding of this because you'd probably do more harm than good. These internal names are used to avoid font subset collisions.
So the short answer is that unless you are comparing two files that are physical duplicates of each other you can't perform a direct comparison on their binary contents. The long answer is that you can tweak some of the PDF entries to remove unique parts for comparison only but you'd probably be doing more work than it would take to just re-store the file in the database.
I am writing an webapp for a used thrift store. We are planning to add all items to a database, and I will be using Laravel and MySQL for this.
We also want to get a barcode scanner in order to scan and add items.
But I've never worked with barcodes before and info regarded this for a website like mine is hard to find info on, so is the barcode-scanners so I'm asking help from someone with experience.
I'm not sure which barcodes we should use, but I'm thinking a 3D one, like QR would do good. I've found several qr-generators, but I'm unsure on how I should create them properly from items.
Say the store is named Brukten. And it has items, with number IDs. Should I then generate barcodes out of "Brukten_53" or something, or just the ID, or how is a smart way? Because I can use an option like this instead of storing the generated barcode, right, and its better to generate a QR each time instead of storing the data about it?
At first we will use a web interface to add items, and later on we want to get a barcode-scanner to help scan things, so I'm guessing it would be nice with a scanner that could take pictures and add to database. So we want the DB to be ready for this, and properly made to work with such systems. So I'm wondering also if anyone can recommend me a device for this. I've seen several but unsure what to choose. 2d, 3d, something with camera, or is there other devices we could use?
What we want a device for is:
We want to store in the db: Old things, new things
We want to retrieve: all things
We want to alter info: edit things, sell, check things
Something easier than going around with a laptop, phone or a tablet and entering stuff.
Building the site is no problem for me, PHP, MySQL, Laravel framework and all is old stuff, but barcodes is a new world for me.
You only have to make sure that every single distinct physical item has a unique ID.
A simple way to accomplish this is using category ids as prefixes.
Suppose your "used men clothes category" is ID 25, and when you enter a pair on jeans of that category into the system, you app assign them ID 12345.
You can reference that item as 002500012345. You only need to calculate the 13rd digit using this function (http://edmondscommerce.github.io/php/barcode/ean13-barcode-check-digit-with-php.html) and you have a full-fledged EAN13 barcode you can print using this font (http://www.fontpalace.com/font-details/EAN-13/) and read with virtually any code scanner.
The other approach is generating a unique url for each product:
http://www.example.com/25/12345.html
And embed the url into a QR code.
You can generate the image for the QR code using this library:
http://phpqrcode.sourceforge.net/
I have a product multiple items, i want to put barcode on them as it is required to sale them in local markete in Pakistan. For this reason i searched on internet to have solutions and i am still a little confused in it. Note: purpose is to sale my product in a local markete and they tell me to put barcode on it.
Do i really have to register my product with GS1 pk to get barcode
number?
Through internet search i found a software named Really Simple Barcode it make some barcode but not very attractive and also ask me about GS1 barcode number.
There is another mobile app named QuickMart is an excellent app to scan different kind of barcode images and also create QR code for free. but i think that's also not what i need.
What kind of barcode i actually need for selling my product in local
markete? codebar is suitable or not?
Do i need only one barcode image which will b placed on all the itmes
of similar product? or i need to have separate barcode image for every
single item of a single product?
Tell me if there is any way to avoid GS1 registration?
Once i will get my barcode image ready, then how to place it on my
product? any simple and effective method?
Thanks in advance.
Do I really have to register my product with GS1 pk to get barcode number?
Yes. GS1 owns the numbers. Each GS1 office has its own rules but generally you need to join GS1
to obtain the numbers. They issue you with a set of numbers which you allocate to products as you need them. It has to be co-ordinated by a central authority (GS1) - same as car registration.
What kind of barcode do I actually need for selling my product in local markete? Is codebar suitable or not?
EAN/UPC 13-digit product code. Using GS1 Databar is not suitable. All systems in use nowadays world-wide are supposed to be able to read EAN/UPC 13-digit codes. If you produce your codes using any other standard, the equipment at the end-user sales location may not be able to read the code you are using.
Do I need only one barcode image which will b placed on all the itmes of similar product? or i need to have separate barcode image for every single item of a single product?
If you produce a million 400g can of beans in tomato sauce then each one will carry the same barcode number. If you produce 400g can of beans in worcester sauce then each one of those will carry another barcode number - it will be a different number from the barcode printed on your 400g can of beans in tomato sauce as it is a different product. Every 825g can of beans in tomato sauce you produce will carry a third number because it is a different size even if it is the same fundamental product.
Tell me if there is any way to avoid GS1 registration?
You can't avoid GS1 registration in some form. Some administrations will allow a single barcode number or a small set to be issued to a small manufacturer. Best idea is to telephone GS1 ( +92 21 2628213 in Karachi) and ask them. I have heard that they don't bite.
Once i will get my barcode image ready, then how to place it on my product? any simple and effective method?
GS1 can advise - it's their job and mission. Your label manufacturer will be familiar with the routine and can guide. All you need to do is worry about location on your product. Black bars on a white background are best, but other colour combinations are possible (and some are prohibited because the scanner equipment has difficulty reading the code.) GS1 can advise - it's their job and mission (I may have said that before.) GS1 will often want you to provide them with a sample of your proposed label for verification and will normally allow you a number of verifications as part of your membership. Again, they will advise what needs to be changed about your label if it has to be modified for any reason.
If you are producing individual labels using a barcode printer, then printing the barcodes is incorporated into the basic functionality of the printer. From there, it depends on whether you are constructing your labels by using the Printer Control Language for your printer (with which you should be familiar) or whether you are using label-designer software where you can no doubt simply drop a barcode onto your form in the same way as any text or graphic.
Tips: Look a similarly-shaped products already on the market for how to arrange your label. For instance, on small cans with a small circumference (like soft-drink cans,) the bars are probably best rotated so that the code is horizontal.
I have received requirements that ask to normalize text box content when the user changes the focus to another control on the same data input form. Example normalizations:
whitespace at the start and end of the input is trimmed
If the text box was made empty and this is not valid, replace the content of the text box with the default value
I have a feeling that this is not in line with good GUI design. I have read the Windows UX Guidelines for text boxes but I did not immediately find any relevant rules.
Is normalizing text box content in this way acceptable?
I have definitely seen this before (examples elude me right now) but I personally don't like it when the UI changes my input.
If the UI is smart enough to change my input on me then it should accept it as is and change the value when it needs to process it.
When the input changes auto-magically you are now forcing the user to stop and ask themselves why it changed and if they did something wrong or if the application has an error. Don't make the user think!
Generally, you should accept user input exactly has they entered it. Chances are users did it that way for a good reason. For example, imagine a user entering a foreign address, and then your app screws it up trying to format like a domestic address. At the very least, users entered the input the way they’re used to it being, so changing it can make it hard for them to cross-check it.
However, there are several exceptions:
Add defaults to incomplete input. Adding input the user left off (e.g., years to dates, units to dimensions) provides good feedback on how the app is interpreting the input that would otherwise be ambiguous. This also encourages the user to use defaults, making their input more efficient.
Resolve other ambiguities. Change to an unambiguous format if the user’s format is open to interpretation. For example, if you have international users, you may want to change “9-8-09” to “Sep 8 2009” (or “9 Aug 2009”) to provide feedback on what your app considers the month and day to be.
Add delimiters when none provided. Automagically adding standard or even arbitrary delimiters to long alphanumeric strings (e.g., phone numbers, credit card numbers, serial numbers) provides an input display that the users can crosscheck more easily. Sometimes users may enter a string without delimiters in order to go faster or because they are the victim of web abuse by sites that refuse to accept even standard delimiters.
Spelling, grammar, and capitalization correction. Users often appreciate this, but only if there’s also a means to override it. Some users like to use "i" as the first person pronoun.
If the field is used by more than one user, then you probably should automatically format the value in some standard way that accommodates the majority of your users, but that should be done when the value is stored on the backend, not when focus leaves the field. For example, if a user enters a time of 15:30 it should remain as 15:30 as long as the user views the page. However, the next time a user (any user) retrieves the data, it should appear as 3:30pm (if that’s how most of your users are used to seeing time).
Such backend formatting applies to trimming whitespace so that all users can search, find, and sort on the field consistently. It’s probably not a good idea to replace a blank value (or any invalid value) with the default because users are unlikely to anticipate getting that value. An exception would perhaps be changing blank to 0 for numeric fields in situations where obviously blank == none == zero, but again this probably should be done when storing in the backend, not in the field itself. If blank is ambiguous, (e.g., may mean 0 or may mean "I don't know") then the second bullet above applies, and you may want to autocorrect in the field when focus is lost.
Of course, if your users vary in how they need to have a data type formatted, then you can have different variants of the app that display the data type in different ways for different user groups, or you can make the format of the data type a user preference, but that’s really another issue.
If the user wants it, and the Stakeholder ask for it, then is perfectly safe.
Trimming is very common. and the replace is common when you are talking about filling textbox with numbers. (a 0 instead of a blank).
It's a fairly standard feature, especially the whitespace trimming. The default value replacement raises a larger flag just because it is less common.
I'm pretty sure that I've seen versions of Microsoft Office that do this - putting "pt." after a value in points, for instance. Microsoft's endorsement should be a good sign.
We have quite a few of these kind of requirement. The reason given for forcing a default value rather than a blank space is that it looks better in reports or if the client wants to see the live system. A blank looks a bit like "couldn't be bothered to enter anything". For a similar reason, we often upper-case the text for consistency as the users never use consistent formatting.