Zebra Printer & Acute (Accented) characters - printing

I am trying to print special characters on a Zebra Printer (é, à, Ô).
So far, I've tried solutions found on StackOverflow (like this one Print characters with an acute in ZPL). In this particular one, the special characters does print correctly, but the font is big and the printer unroll a few inches of paper before actually printing.
I've read Zebra Programming doc but I can't seem to make it work.
Also, it does not look at all like the code I have so far :
T 0 3 40 0 ^FDHimudit\82
T 0 3 40 30
T 0 3 40 60
T 0 3 40 90 Déroulage Réduction Öyster
T 0 3 40 120 Règle ÀAA ÂA
SETFF 100 2.5 FORM PRINT

Related

Postscript file - Image instead text

With a Postscript driver (Xerox, Canon, HP, all), when I create a PS file, for example when I print the test page in the printer properties, I get :
OK :
The view of the result is correct (with GSview for example)
Not OK :
The file size is to big, more than 4 MB.
When I edit the file, I have one big image (doNimage). I think is the reason of the big size file.
The example file : https://drive.google.com/open?id=0B9bet657DEU5alV6WFZZdDFjMmc
I'm on Windows 10, similar problem with Windows server 2012 r2.
I let the configuration of the driver by default.
Anyone has an idea ?
Thanks a lot.
Regards.
I don't understand your problem, the file you posted a link to contains text. Here's an example:
360 4485 M <202530360E0F1102381030100D100B0824152D30103102020C302A1E19181B1E1730132E28301530132D3B02230B2A2E22081308>[46 16 28 70 18 42 44 44 54 32 28 32 36 32 25 39 65 40 40 28 32 44 44 44 18 28 53 45 20 47 38 45
40 28 34 40 40 28 40 28 34 40 18 44 44 25 53 40 16 39 34 0]xS
M is a moveto and xS uses the xshow operator to draw the glyphs represented by the character codes in the hexstring, using the values in the array to modify the width of each glyph.
If you were expecting to see ASCII character codes you are going to be sadly disappointed, the files uses an incrementally downloaded subset TrueType font, so the character codes are defined as they are encountered, that is the first glyph used will be given character code 1, the second will be character code 2 and so on.
Even without that, using ASCII would limit the languages that could be supported. Back in the 1980s that maybe didn't seem like a problem, but its a long time since that was considered acceptable.
If you were expecting to be able to modify the text by editing it in a text editor, forget it. PostScript is a programming language, and the output of a PostScript printer driver is a machine-generated program. Its a lengthy process for a skilled user of the language to decipher what the program is doing. The program is not amenable to alteration, if there's a fault in the output, correct the original document and recreate the PostScript program from the original.
PostScript is not an editable format.
Thanks all for your response. I see I was not very clear in my question.
Here is the state :
With the PS driver, on a windows server 2008, I get this file :
http://expirebox.com/download/0bb511565377e8b74eead67641fe7f68.html
Inside the file I can see the text "Page de test d\222imprimante"
On a Windows server 2012 R2 :
http://expirebox.com/download/60fa957cba97c82bbcd5c0e975825b52.html
I can't see any text. It's a printer page test too.
I need to see text because I'll print document with code inside. Code for a printer to identify page type. (for example a white page for the tray n° 1, yellow page for tray 2)
KenS : I understand your point. But why the same driver give different file.
I checked if it's really the same. The only difference I see is the OS, one x86, the other x64.
Thanks.
Regards.

CGPDFScanner - \x15 character while scanning

I am trying to extract the text of page 5 in pdf.
The pdf have a font YLJAAA+CMSY10 which has no mappings (CMap) or even encodings (default encoding or /Differences). While extracting text, after string "tetex package" CGPDFScanner returns "\x15" character which is encountered many times. When this character is encountered current font is the above mentioned font which has nothing to extract the text from pdf string.
What is this \x15 character?
Thanks.
I found 2 (not "many") occurrences of this:
[ (\025) ] TJ
which is a number in octal – this is the number that is \x15 in hexadecimal.
The font definition for "YLJAA+CMSY10" in the PDF carries no special encoding, so it has the default encoding for "CMSY" ("Computer Modern Symbol"):
114 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont 210 0 R % -> "/YLJAAA+CMSY10"
/FirstChar 0
/FontDescriptor 211 0 R
/LastChar 127
/Widths 204 0 R
>>
211 0 obj
<<
/Ascent 750
/CapHeight 683
/CharSet (/bullet/greaterequal/arrowright/arrowdblright/element/negationslash/backslash/radical)
/Descent 0
/Flags 4
/FontBBox [ -29 -960 1116 775 ]
/FontFile 205 0 R
/FontName 210 0 R % -> '/YLJAAA+CMSY10'
/ItalicAngle -14
/StemV 85
/XHeight 430
>>
endobj
In itself, this still says nothing definitive: a PDF producer may reorder glyphs and encodings at will, as long as it does the same with the embedded font). Assuming the font set is not reordered, checking a random list of CMxx encodings shows that the character code 0x1F could well be GREATER-THAN OR EQUAL TO (Unicode U+2265).
Acrobat agrees; inspecting the font in the PDF shows that character code 21 (decimal) is named 'GREATER-THAN OR EQUAL' and looks like it as well.

How to extract multiple line strings between two keywords using grepwin

Hi I have a directory of files and each file has multiple languages text strings over multiple lines. Using grepwin I would like to extract all the English text strings and save into another text file. Typically in the each file the english text is inside a Switch/Case condition like this:
Default //English
bitmap 8 20 "bmp5/warning.bmp"
Ltext 5 1 11 "USB Device Overload"
LText 85 20 13 "USB"
Ltext 50 33 13 "Device Overload!"
Break
Case _French
bitmap 8 20 "bmp5/warning.bmp"
LTEXT 5 1 11 "Surcharge clé USB!"
LTEXT 45 30 13 "Surcharge clé USB"
Break
Since all the English text is always between 'Default' and 'Break' I want to use those two keywords as the delimeter. Finally all the text between the two keywords needs to be saved out to another text file.
Can anyone help at all.
Thanks guys
Through grep.
$ grep -oPz '(?s)(?<=\n|^)Default\b[^\n]*\n\K.*?(?=\nBreak\b)' file
bitmap 8 20 "bmp5/warning.bmp"
Ltext 5 1 11 "USB Device Overload"
LText 85 20 13 "USB"
Ltext 50 33 13 "Device Overload!"
To save the result to another file, you need to use output redirection operator.
grep -oPz '(?s)(?<=\n|^)Default\b[^\n]*\n\K.*?(?=\nBreak\b)' infile > outfile
From man grep
-P, --perl-regexp PATTERN is a Perl regular expression
-z, --null-data a data line ends in 0 byte, not newline

Formatting credit card track II data separator using Cobol

We have a legacy COBOL program that formats the iso 8583 0100 authorization request. Recently we were told the track II data was invalid due to the separator. The track II data is in a PIC X() field and we simply replace the = with the character D before running the data through a binary intrinsic 2 bytes at a time.
We are told that the character is converting to 4 on their side. My question is: What character should we use to replace the = character? Or do we leave the = character alone?
Thanks for any guidance.
Track 2 data is stored on a Credit card as Binary Coded Decimal with parity and the other possible binary values are used for controls.
Hex ASCII Meaning
0 0 0
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
A : (not used)
B ; Start Sentinel
C < (not used)
D = Field Separator
E > (not used)
F ? End Sentinel
I have a feeling that the "binary intrinsic" is simply converting ASCII to BCD, which if you used the standard ASCII characters you would get what you want, as the = is a 0x3D in ASCII and if you strip off the first nibble you are left with a 0xD.

XNA curve import from Maya?

I am trying to import a movement curve from Maya into my XNA game, but I cannot figure out how. Basically I want to catch the curve by it's name, and look up its values at different points of time.
Are curves exported into FBX at all? And, if not, then how to catch it?
Edit: Maya can export to Maya ASCII, and I tried to parse it, but I am not sure what formula I should use to recreate the curve.
Here is a Maya ASCII segment defining a typical curve:
createNode transform -name "curve1";
createNode nurbsCurve -name "curveShape1" -parent "curve1";
setAttr -keyable off ".visibility";
setAttr ".cached" -type "nurbsCurve"
3 11 0 no 3
16 0 0 0 1 2 3 4 5 6 7 8 9 10 11 11 11
14
-4.9774564508407968 0 -6.8331005825440476
-5.5957526204336077 0 -5.5944567905896161
-6.8323449596191823 0 -3.1171692066807277
-5.6935230034445992 0 3.3047128765440847
-1.6528787527978079 0 8.8676235621397499
7.5595909161095838 0 10.325347443191644
9.2297347448508607 0 8.5586791722955731
10.0730315036276 0 0.93412333819133941
5.9770106513247976 0 3.7809964481624871
2.9006817236214149 0 -3.3327711853359037
11.373191256465434 0 -4.6672854260704906
4.5697574985247682 0 -14.178349348937205
2.4191279569332935 0 -11.415532638650156
1.3438131861375628 0 -10.034124283506653
;
I managed to find the file format reference somewhere, the important info here is the knot indexes (16 0 0 0 1 2 3 4 5 6 7 8 9 10 11 11 11) and the coordinates (all lines containing three numbers).
But, I still have no idea how to recreate the curve. I googled a lot for nurbscurves, bsplines etc, but could not successfully match the result in Maya with any code I could find.
I've achieved this in 3dsmax by exporting the curve in Ascii format and parsing the text manually, does Maya have any such exporter?

Resources