Print ZPLII QR to open url - qr-code

I'm using Zebra ZPLII to create a label with a QR code to open an specific url. When I use iPhone camera to scan the QR phone shows "unusable data" and when I try with an external QR reader the text extracted from the QR is not the same from the label. For example if I write www.google.com the string that I have from reading the QR is .google.com if I use https://www.google.com the result is ps://www.google.com
This is my label desing
^XA
^FX Top section with company logo, name and address.
^CF0,60
^FO220,50^FDIntershipping, Inc.^FS
^CF0,30
^FO220,115^FD1000 Shipping Lane^FS
^FO50,155^GB700,1,3^FS
^FX Third section with barcode.
^BY5,2,70
^FO300,95^BQN,2,4^FDwww.google.com^FS
^XZ
For testing I'm using http://labelary.com/viewer.html

You are missing some of the parameters for the ^BQ and ^FD commands.
^BQ parameters:
^BQa,b,c,d,e
Where
a = Orientation
b = Model
c = Magnification factor
d = Error correction
e = Mask Value
The last two parameters are actually brought into the ^FD command after the ^BQ. Strange design, but that's how it works.
Full Barcode String
^FO300,95^BQN,2,6,M,7^FDQA,www.google.com^FS
Full ZPL for sample label
^XA
^FX Top section with company logo, name and address.
^CF0,60
^FO220,50^FDIntershipping, Inc.^FS
^CF0,30
^FO220,115^FD1000 Shipping Lane^FS
^FO50,155^GB700,1,3^FS
^FX Third section with barcode.
^BY5,2,70
^FO300,95^BQN,2,6,M,7^FDQA,www.google.com^FS
^XZ
Documentation:
https://support.zebra.com/cpws/docs/general/EncodingUnicode_QRCode.pdf
https://support.zebra.com/cpws/docs/zpl/13979l-010_ra.pdf

Find an easy solution, seems that the problem is that all the text after ^FD is not interpreted as text or something like that. To solve my problem I just did this:
^FO300,95^BQN,2,4^FDwww.google.com^FS
change to this:
^FO300,95^BQN,2,4^FD www.google.com^FS

Related

How do I encode Ctrl functions in QR Codes?

I want to make a QR Codes to automate a process for label printing using Easy Labels.
I've already created QR codes that contain file paths and part numbers.
Where I'm running into a brick wall is finding a way to include Control Commands, specifically Ctrl+o and Ctrl+p so Open File and Print commands are issued from the QR code.
I've searched for weeks trying to find a way and this community is the closest thing I've found to a glimmer of hope.
Since I'm trying to do this in plain text, I have no code, so I will provide the desired sequence when scanned by the operator.
(Ctrl+o)T:\Easy Labels\Customers\Toyota\MEX_mat.lab
(Ctrl+p)1704412
The goal is to make a fast and easy way for operators to print their labels as quickly as possible with as few steps as possible on their part with minimum errors.
When the QR is scanned, the first thing it will need to do is issue an Open File command followed by a string that contains the entire file path where the labels for that particular part is located in the database, then sends a return carriage to finish the open process.
Next, it will send a single space to clear a pop-up window message.
Finally, it will send a Print command followed by another string that contains the part number.
If I have to wrote code to accomplish this, assistance would be greatly appreciated.
The test QR code has been generated with Java code. It might or might not be helpful for you:
package qrcodetest;
import io.nayuki.qrcodegen.QrCode;
public class QrCodeWithCtrl {
public static void main(String[] args) {
QrCode qrCode = QrCode.encodeText("\u000fT:\\Easy Labels\\Customers\\Toyota\\MEX_mat.lab\n\u00101704412", QrCode.Ecc.MEDIUM);
System.out.println(qrCode.toSvgString(8));
}
}
In the code \u000f stand for CTRL+O, \u0010 stands for CTRL+P. The four digit number is in hexadecimal and goes from 0001 for CTRL+A to 001a for CTRL+Z.
The code uses the QR code library (available on Maven Central):
io.nayuki:qrcodegen:1.4.0

Printing QR code with a parameter in Zebra language

I'm trying to print a QR code including a parameter on a label
I need to take this value:
^A0R,33,26^FO301,296^FV#01/HarnessId;02/02;03/
HarnessId (z.B. 999):;04/-;05/param_HarnessIdCnt#^FS
and put it in a QR code. I tried this, but i doesn't print anything:
^BXN,10,20,,,,,2^FO153,43^FV#01/HarnessId;02/02;03/
HarnessId (z.B. 999):;04/-;05/param_HarnessIdCnt#^FS
you should try with the BQ command
Link to viewer

What is the meaning of Google Translate query params?

What is the meaning of all Google Translate query params?
client:t
sl:auto
tl:sk
hl:sk //language of the interface (default:en, you can try xx-bork or xx-hacker)
dt:bd
dt:ex
dt:ld
dt:md
dt:qc
dt:rw
dt:rm
dt:ss
dt:t
dt:at
dt:sw
ie:UTF-8 // encoding of the input (default: utf-8)
oe:UTF-8 // encoding of the output, the results (default: utf-8)
otf:1
srcrom:1
ssel:3
tsel:0
q:translate // query, what you type in the search box
I already discovered some of them.
I'm developing an online translator app, and this is what I found out empirically:
sl - source language code (auto for autodetection)
tl - translation language
q - source text / word
ie - input encoding (a guess)
oe - output encoding (a guess)
dt - may be included more than once and specifies what to return in the reply.
Here are some values for dt. If the value is set, the following data will be returned:
t - translation of source text
at - alternate translations
rm - transcription / transliteration of source and translated texts
bd - dictionary, in case source text is one word (you get translations with articles, reverse translations, etc.)
md - definitions of source text, if it's one word
ss - synonyms of source text, if it's one word
ex - examples
rw - See also list.
dj - Json response with names. (dj=1)
Here are a few more:
client t probably represents the standalone google translate web app (as opposed to a mobile app, or the widget that pops up if you google search "translate")
sl is source language
tl is translate language (the language you want to translate into)
srcrom seems to be present when the source text has no spelling suggestions

How to get the size of symbols in the symbol table of Mach-O file?

Before watch the mail list, I'm confused with the lack of "size" of symbol table in the Mach-o file. And I found the solution in source file posted in that E-Mail, which note that:
//Mach-O symbol table does have size in it
//so need to scan ahead to find symbol with next highest address.
But when I parse out the symbol table in a Mach-O file (I got the symbol table from the symtab_command and the following nlists) and trying to calculate the size of one global symbol as the same way, I was confused again when I compared the symbol table from the output of dwarfdump (dwarfdump -ae). The end address of the symbol in the symbol table from the dwarfdump is different from the result my program's output. Is there some problem with the symbol table I parsed out? Or is there some other way to work out it?
Some of the output from my program:
<start address> <section index> <method>
0x0006d030 1 ___arclite_objc_autoreleasePoolPop
0x0006d048 1 _patch_lazy_pointers
0x0006d1f0 1 ___arclite_objc_autoreleasePoolPush
The corresponding part of the output from dwarfdump:
0x0014a37b: [0x0006d030 - 0x0006d046) __arclite_objc_autoreleasePoolPop
0x0014a122: [0x0006d048 - 0x0006d1ee) patch_lazy_pointers
0x0014a3a0: [0x0006d1f0 - 0x0006d212) __arclite_objc_autoreleasePoolPush
So if I use the way in the "MachONormalizedFileToAtoms.cpp" to calculate the end address of the symbol (look ahead to find symbol with next highest address), the result must be different from the output of dwarfdump. And does anyone know how dwarfdump calculate it?
Thank you!
From the answer by Nick Kledzik:
The compiler often aligns functions to start at aligned address (e.g. 8 or 16 bytes). So, there is padding bytes (usually NOPs) after the end of a function and before the start of the next function.
dwarfdump has access to the debug info which does have size info for functions. So dwarfdump can show the size of a function without the alignment padding at the end. Whereas the linker just looks at the next symbol address. There is not much point in the linker digging through the debug info to get a function’s true size, because when writing the output, the linker has to align the next function which would just add back the pad bytes.
I hope that can help others who has the same confusion.

Directions API overview_polyline doesn't have correct points

Has anyone had an issue with the points returned by the Google Directions API? The overview_polyline doesn't seem to match the directions I've asked for.
The Directions API gives the example:
http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false
In the JSON response I see includes:
"overview_polyline" : {
"points" : "e`miGhmocNaN~DiBiNe#gEkEek#kNez#cJqq#sk#pGos#v]_}#aF_y#qm#qDe~#w]g~#gZ_Jo_#m_#yNsFgUpMov#~QebBrJq`BjTsx#w#kOqbEq_#qkCcf#}}Dej#yzCuf#o{Ba]m~EtVewAnBa`#sNmm#}dDufGqwA_|D_z#g~CmtBkuOrBmtCyG_yCam#{`Ee]qkB}d#ucDmDe|Aha#e}At]{v#xD}e#yf#aeIm^{rEgp#ahBiZu`BkVueH}gDwuXu`Fi__#yZecHgoAgyIl[ybCo^sgD_n#akBaJmeBog#yyAe`#ayB~FifCjNkmAzTwpAgf#cpFy~#{lJsg#ojHyi#e_Fq}#o`Dog#}tBoYmz#y`#sf#qf#ohCkLugBuv#seAg[ul#mMowBqc#iiC}eAcwCqm#_fBmuAypFyIiqA}BwyBy`#ogAwt#ypBezC{dIahBwxJgb#ytCw~AwvJkQwu#{t#yrCg{#s{Fgb#ehDzKsdAxO}vAiRmpCwcAorNuwAgdS_r#imJq[orAk]wrA_TyzAnFefAa\\guB_OmwAwF{tCwMcbDcr#m}_#}Qo_RgMo|A|d#kpAne#u{Brb#wnDzNkuB_D{v#eSgf#w\\ieAyb#guCii#ifCga#i_Amc#m]urAyoD}o#kiIsr#opQuLkhAc_#q`Bq\\}bEeEyi#iE}t#pHi|#tBmlBebB{qHq_BinFoWgpBoDuqEob#k{ConAedC}L}h#yd#yfAgz#}gAaZi_#m}#mcBwyAaj#_bBg|#csBm_Bo|BkaC{iBqsB_YqyBxEmtBks#aoB{RgLa~#bCcr#cLyoAemBeg#gt#_}#e`#on#uu#etA}vCqp#ubAklDgeGmxFiqHaqFoeHa[wbBu]}gAuoDeeG{uAooB_uAsy#om#ugAu_L{xSshEe_KieDm|KcfIcuWeUcOwy#aP{QuUg`BipF{P_l#klAgaEmjEs}NsvAiyFs}#izFjwAqrGtHkbCeB{cEql#g~CgSk|#mB}oAqNekEgw#cmDo_BgjFqqC}gH}`CwvG}cA{cB}nFowQ_t#an#efBmpE_oAsvCka#mwBk_CqbGuu#qfB{uAmrDivDw|E{nAqbDmpCyaJgdCejHk~#owAsw#adAm_#abA}Ven#qCou#cKeiBca#_cBmlAyjAsn#_kCk}#smDkVg{Bk}#gcHox#_sEaPwdC~KazF{EcpCrEmeGl]auBeEi~#yiAovCwwAgsC{i#oSsbAu~Ay_AmaBk_#iKak#mh#_BmBk#wHvG#dBvA"
},
Decoding this using the Interactive Polyline Encoder Utility shows a path starting in Toronto as expected but going a different direction with an end point nowhere near Montreal.
Any ideas?
For background, I'm trying to use the polyline to generate a static map. The static map API allows passing encoded polylines.
I have had success using Mark McClure's tools:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
on archive.org
Your polyline works for me when I use this tool to decode it:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html
on archive.org
and this to display the results:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/encodeForm.html
on archive.org
Encoded polylines often have issues with "\" escaping the next character.
See this example [1] (can't seem to get it to display as a link)
with each '\' changed to a single '\'
From this issue where it does display as a link.
[1] http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:blue|enc:cyrdIzsee#dOiBpG~j#bA%60t#mGxu#y#xl#pDdTtOnrAtRg#~J|AdHcI~Dpn#d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ni#vNzf#re#~qAngAr}Al{#l~#hIt_AfLpyBzvArcAvjAdkBndAtt#faA~x#jv#dkAhy#%60h#hr#jZjWpv#t\bd#xIr\rGrZc%60#d[ad#rIa%60#dT{KhQdLnKfTnOvUdUBje#qQdYrPlRnU%60HbANrGaNbu#jR|jDvAzhChEnUjJtbA}Af[l#|\lKvQMtLtFhh#fHlh#_DZ_BmO&sensor=false
Here is your line on a static map (after changing \\ to \):
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=weight:3|color:blue|enc:e%60miGhmocNaN~DiBiNe#gEkEek#kNez#cJqq#sk#pGos#v]_}#aF_y#qm#qDe~#w]g~#gZ_Jo_#m_#yNsFgUpMov#~QebBrJq%60BjTsx#w#kOqbEq_#qkCcf#}}Dej#yzCuf#o{Ba]m~EtVewAnBa%60#sNmm#}dDufGqwA_|D_z#g~CmtBkuOrBmtCyG_yCam#{%60Ee]qkB}d#ucDmDe|Aha#e}At]{v#xD}e#yf#aeIm^{rEgp#ahBiZu%60BkVueH}gDwuXu%60Fi__#yZecHgoAgyIl[ybCo^sgD_n#akBaJmeBog#yyAe%60#ayB~FifCjNkmAzTwpAgf#cpFy~#{lJsg#ojHyi#e_Fq}#o%60Dog#}tBoYmz#y%60#sf#qf#ohCkLugBuv#seAg[ul#mMowBqc#iiC}eAcwCqm#_fBmuAypFyIiqA}BwyBy%60#ogAwt#ypBezC{dIahBwxJgb#ytCw~AwvJkQwu#{t#yrCg{#s{Fgb#ehDzKsdAxO}vAiRmpCwcAorNuwAgdS_r#imJq[orAk]wrA_TyzAnFefAa\guB_OmwAwF{tCwMcbDcr#m}_#}Qo_RgMo|A|d#kpAne#u{Brb#wnDzNkuB_D{v#eSgf#w\ieAyb#guCii#ifCga#i_Amc#m]urAyoD}o#kiIsr#opQuLkhAc_#q%60Bq\}bEeEyi#iE}t#pHi|#tBmlBebB{qHq_BinFoWgpBoDuqEob#k{ConAedC}L}h#yd#yfAgz#}gAaZi_#m}#mcBwyAaj#_bBg|#csBm_Bo|BkaC{iBqsB_YqyBxEmtBks#aoB{RgLa~#bCcr#cLyoAemBeg#gt#_}#e%60#on#uu#etA}vCqp#ubAklDgeGmxFiqHaqFoeHa[wbBu]}gAuoDeeG{uAooB_uAsy#om#ugAu_L{xSshEe_KieDm|KcfIcuWeUcOwy#aP{QuUg%60BipF{P_l#klAgaEmjEs}NsvAiyFs}#izFjwAqrGtHkbCeB{cEql#g~CgSk|#mB}oAqNekEgw#cmDo_BgjFqqC}gH}%60CwvG}cA{cB}nFowQ_t#an#efBmpE_oAsvCka#mwBk_CqbGuu#qfB{uAmrDivDw|E{nAqbDmpCyaJgdCejHk~#owAsw#adAm_#abA}Ven#qCou#cKeiBca#_cBmlAyjAsn#_kCk}#smDkVg{Bk}#gcHox#_sEaPwdC~KazF{EcpCrEmeGl]auBeEi~#yiAovCwwAgsC{i#oSsbAu~Ay_AmaBk_#iKak#mh#_BmBk#wHvG#dBvA&sensor=false
The Google APi have a parameter now: path=enc:
"https://maps.googleapis.com/maps/api/staticmap?
size=300x300&key=YOUR_KEY&path=enc:" + direction.routes[0].overview_polyline
Focus on offical guides

Resources