Is there a flag that tells Zebra printers to include the check digit in the textual representation of a barcode? - compact-framework

I am sending CPCL commands from a handheld device to a Zebra QL220 printer to print barcode labels. It seems that when the barcode prints, the barcode value is correct (it incorporates/appends the check digit to the machine-readable swath of vertical black (and/or white) stripes), but the check digit is not incorporated/appended to the Text representation (below the barcode).
IOW, the barcode may represent "123456789014" but the text value is "12345678901" (it's lacking the check digit).
Is there an easy way to "turn this on," such as via one of the flags sent to the printer via CPCL, or will I have to manually manipulate the Text value to display the check digit appended to the barcode?

Looking through the CPCL manual (page 5.17: https://support.zebra.com/cpws/docs/comtec/PROMAN-CPCL_RevY.pdf ) and the ZPL manual (https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf), there appears to be no documented command flag that will cause a printer to print the checksum in the barcode interpretation line. I think you will have to include it yourself.

Related

Barcode Human Readable Text ( Interpretation Line) masking in ZPL II

I am trying to make a ZPL Label with Code 128. My issue is that I would like to alter the human readbale interpretation line under the barcode. Normally, it gets printed as what it is encoded, i want to add spaces after 5 characters (as picture).
enter image description here
I was able to do it in Zebra designer but we have to store the label as ZPL and if I export the .prn file it gets encrypted and i get always the same barcode printed, which in my case is not correct.
I tried to turn off BC interpretation line and used ^FN to print interpretation line and do some formatting on it but after going through internet and ZPLII manuals , I am unable to find anything.
content of .prn file, i am getting:
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNW
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR4,4
~SD15
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW2457
^LL1200
^LS0
^FO652,258^GFA,2573,46768,148,:Z64:eJzszjEOgDAMA0D//9NGJYXuDEy3RHEiS9emSbtGetYnTp5wb9mF9Zjrx1r3LafwdpmYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJ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M3QBl1Vzvv1cd9uz0ST6y8eNAkkha8BTq+Pd9PuPYJmLlikJpOr1cv2HqGb9u8R+D3X9SfT3yOYS+8RaPJsBf46Nseog6C+ZnE6bTB7k2ErMNllcwx1URNfs8T1wvuWXrb3UsPTq55uOLyX2sqWiLQsaXsvxRT/ynupu9zlLne5y13ucpf/vvwFfhWYpQ==:AC0D
^PQ1,0,1,Y
^XZ

ZPL Script for barcode GS1-128 issue

Using ZPL script, I have to generate a barcode with GS1-128 (formally known as Code 128, UCC/EAN 128).
The problem is, it is generating barcode but a number is not correct from the middle of the barcode.
^XA
^FO15,280
^BY3,2:1
^BCR,100,Y,Y,Y,D
^FD(01)90717497100536(3202)0090(11)210716(21)9000000014^FS
^XZ
But in output, it generates a barcode (01)90717497100535(3202)0090(11)210716(21)9000000014
535 instead of 536.
Any idea?
It is fixed by adding additional zero to start.
Ref: https://stackoverflow.com/a/68502657/323917
^XA
^FO15,200
^BY3,2:1
^BCR,100,Y,Y,Y,D
^FD(01)00090717497100536(3202)0090(11)210716(21)9000000014^FS
^XZ
You have wrongly calculated check digit - it is 5 as printer corrects you. This correction may be turned off, but I am not sure about that and I would never recommend turning it off. GTIN with wrong check digit is not valid. To wrap it up, the generated code is correct, just check your input GTINs to see if they have correct check digits.

PDF extracted text seems to be unreadable

Situation: I've a PDF using version 1.6. In that PDF, there are several streams. There were compressed text (Flate) in that streams, so I decompressed these streams. After that, I extracted the Tj-parts of the corresponding, decompressed streams. I assumed that there would be readable text between the brackets before the Tj command, but the result was the following:
Actual Question: As I have no idea, what I've got thre, I would like to know what type of content it is. Furthermore: Is it possible to get a plain text out of these string or do I need further information to extract plain texts?
Further research: The PDFs, which I try to analyze where generated by iTextSharp (seems to be an C# Library for generating PDFs). Don't know whether it is a relevant information, but it might be that that Library uses a special way of encrypt it's text data or something...
I assumed that there would be readable text between the brackets before the Tj command
This assumption only holds for simple PDFs.
To quote from the PDF specification (ISO 32000-1):
A string operand of a text-showing operator shall be interpreted as a sequence of character codes identifying the glyphs to be painted.
With a simple font, each byte of the string shall be treated as a separate character code. The character code shall then be looked up in the font’s encoding to select the glyph, as described in 9.6.6, "Character Encoding".
With a composite font (PDF 1.2), multiple-byte codes may be used to select glyphs. In this instance, one or more consecutive bytes of the string shall be treated as a single character code. The code lengths and the mappings from codes to glyphs are defined in a data structure called a CMap, described in 9.7, "Composite Fonts".
(Section 9.4.3 - Text-Showing Operators - ISO 32000-1)
Thus,
I would like to know what type of content it is.
As quoted above, these "strings" consist of single-byte or multi-byte character codes. These codes depend on the current font's encoding. Each font object in a PDF can have a different encoding.
Those encodings may be some standard encoding (MacRomanEncoding, MacExpertEncoding, or WinAnsiEncoding) or some custom encoding. In particular in case of embedded font subsets you often find encodings where 1 is the code of the first glyph drawn on a page, 2 is the code for the second, different glyph, 3 for the third, different one, etc.
Furthermore: Is it possible to get a plain text out of these string or do I need further information to extract plain texts?
As the encoding of the string arguments of text showing instructions depends on the current font, you at least need to keep track of the current font name (Tf instruction) and look up encoding information (Encoding or ToUnicode map) from the current font object.
Section 9.10 - Extraction of Text Content - of ISO 32000-1 explains this in some more detail.
Furthermore, the order of the text showing instructions need not be the order of reading. The word "Hello" can e.g. be shown by first drawing the 'o', then going left, then the 'el', then again left, then the 'H', then going right, and finally the remaining 'l'. And two words need not be separated by a space glyph, there simply might be a text positioning instruction going right a bit.
Thus, in general you also have to keep track of the position of the separate strings drawn.

GNU Radio text file sink

I'm trying to teach myself basics of GNU Radio and DSP. I created a flowchart in GNU Radio Companion that takes a vector that is the binary representation of a single character (the character "1" as "00110001"), modulates, demodulates, and writes to a file sink.
The scope sink after demodulation looks like the values are returned (see below; appears to be correct pattern of 0s and 1s), but the file sink, although its size is 19 bytes, appears empty, or at least is not returning the correct values (I've looked at it in ASCII and Hex text editors). I assumed the single character transferred would result in 1 byte (or 8 bits) -- not 19 bytes. Changing some of the settings in the Polyphase Sync and adding a Repack Bits block after the binary slicer results in some characters in the output file, but never the right character.
My questions are:
Can GNU Radio take a single character, modulate/demodulate it, and return the same character?
Are there errors in my flowchart?
I'd appreciate any insights or suggestions, thank you.

What does an /ActualText of FEFF0009 mean in a PDF?

I've been looking into a PDF file to understand how it is built.
I noticed that InDesign has created PDFs with text as below (after decompression using pdftk).
0 Tc /Span<</ActualText<FEFF0009>>> BDC
4.018 -0.2 Td
( )Tj
I understand the role of ActualText (for copy/paste/searching) but I'm wondering exactly how I should be interpreting the FEFF0009. It looks like a UTF-16 string with BOM chars to represent a tab character. This seems incorrect as it's really a space. I'm wondering if there is a special meaning here?
.. This seems incorrect as it's really a space.
No, it's really a tab.
14.9.4 Replacement Text
NOTE 1: Just as alternate descriptions can be provided for images and other items that do not translate naturally into text (as described in the preceding sub-clause), replacement text can be specified for content that does translate into text but that is represented in a nonstandard way.
(PDF 32000-1:2008)
The PDF text engine does not support the concept of 'tabs'. In this case, InDesign mimicked the function of a tab character by inserting a space in the text stream, and it could set the space width to match the distance spanned by the original tab or use a large relative positioning for the rest of the text (which it did here: the horizontal displacement of 4.018 in your code snippet).
The general idea is that a space is rendered on the position of the tab, but when you copy this text and paste somewhere else you get a tab character. I suppose the 'space' is only inserted to have something to copy.