datalog / qrcode-svg Goto Github PK
View Code? Open in Web Editor NEWPure javascript QR Code generator. Armed with elegant svg path method.
License: MIT License
Pure javascript QR Code generator. Armed with elegant svg path method.
License: MIT License
Is it possible to only get the data from the svg?
It would be great, if we could do something like this:
QRCode({
msg: 'xxxxxxxxxxxxx',
dim: 120,
pal: ['var(--primary-color)', 'var(--secondary-color)'],
x: 123,
y: 45
})
that will result in:
<svg x="123" y="45" viewBox="0 0 37 37" width="120" height="120" fill="var(--primary-color)" ...
This QRCode fails:
The text is:
https://xx.xxxxxx.xxxxx/access?v=1#xxxxxx Ladebox AABBCC;xxxxxx-aabbcc;0000-1111-2222-3333;BAPchN1DqT+qCQj0e2YI9hcucAPTHfo8dIghaU+9FKYuK3DPCeSrXL1Xiw7mVnQgZYEtQyJ65OmE5xd84Z/TCtk=|xxxxxx-aabbcc;1234|xxxxxx Ladebox AABBCC;WLANAPPASSWORD|MHcCAQEEIOT8am0Gm12s8FrYyey9ZGxokJYFq9SwnZXrKMapk2AioAoGCCqGSM49AwEHoUQDQgAEA9yE3UOpP6oJCPR7Zgj2Fy5wA9Md+jx0iCFpT70Upi4rcM8J5KtcvVeLDuZWdCBlgS1DInrk6YTnF3zhn9MK2Q==;|MEUCIQCICZimFhTKKkGIQYZ1xT6IIW9gb4qrTkqshqFw5t/NqgIgEpionQtSVPXYryGTHvhhDeBuZ82H19fyCTZE01uyOww=
When I test it via: https://qrlogo.kaarposoft.dk/qrdecode.html I get the following error message:
Debug output
skew_limit=11.5
skew=0
left=22 right=723 top=17 bottom=718
size=702
findModuleSize matchVersion version=1 grade=0
findModuleSize matchVersion version=2 grade=0
findModuleSize matchVersion version=3 grade=0
matchVersion version=4 finder0=40 finder1=33 finder2=35
findModuleSize matchVersion version=4 grade=0
findModuleSize matchVersion version=5 grade=0
findModuleSize matchVersion version=6 grade=0
findModuleSize matchVersion version=7 grade=0
matchVersion version=8 finder0=34 finder1=33 finder2=39
findModuleSize matchVersion version=8 grade=0
findModuleSize matchVersion version=9 grade=0
findModuleSize matchVersion version=10 grade=0
matchVersion version=11 finder0=37 finder1=34 finder2=33
findModuleSize matchVersion version=11 grade=0
matchVersion version=12 finder0=47 finder1=43 finder2=43
matchVersion version=12 version topright = 0 4 version bottomleft = 0 4
findModuleSize matchVersion version=12 grade=0
matchVersion version=13 finder0=41 finder1=38 finder2=38
findModuleSize matchVersion version=13 grade=0
matchVersion version=14 finder0=32 finder1=35 finder2=34
findModuleSize matchVersion version=14 grade=0
matchVersion version=15 finder0=32 finder1=36 finder2=35
findModuleSize matchVersion version=15 grade=0
matchVersion version=16 finder0=63 finder1=63 finder2=63
matchVersion version=16 version topright = 0 4 version bottomleft = 0 4
findModuleSize matchVersion version=16 grade=0
matchVersion version=17 finder0=64 finder1=64 finder2=64
matchVersion version=17 version topright = 17 0 version bottomleft = 17 0
matchVersion version=17 timing0=1 timing1=1 alignment=1
matchVersion version=17 format_NW =2 0 format_NESW =2 1 format = 2 ecl = 0 mask = 2
matchVersion version=17 grades(F(V)TAF): 44444->4
findModuleSize matchVersion version=17 grade=4
findModuleSize version=17 grade=4 error_correction_level=0 mask=2
getCodewords mask=2 length=815
getCodewords = 64,38,132,195,179,84,116,182,55,183,83,31,247,227,21,19,84,52,167,166,23,3,38,130,20,134,35,148,55,131,134,54,23,135,4,71,151,51,245,20,6,227,135,87,71,20,21,115,71,67,117,148,148,20,148,71,20,66,118,196,134,52,52,212,103,247,7,36,183,213,198,22,211,103,179,115,119,51,36,20,102,150,211,67,5,37,87,115,162,52,53,229,39,4,148,67,19,66,208,242,51,22,22,38,118,23,115,211,244,236,247,182,163,117,86,211,116,5,211,231,17,23,198,6,165,242,19,84,87,183,22,236,34,150,83,148,4,39,134,6,196,116,17,230,39,37,87,198,51,245,147,212,150,236,198,38,148,69,22,132,85,71,85,116,17,150,86,147,23,70,103,20,38,84,87,236,39,242,150,148,86,37,69,52,52,6,17,38,214,134,163,38,151,22,211,149,150,236,86,22,55,99,247,150,116,132,20,246,17,242,22,86,84,130,87,20,163,52,229,236,230,38,52,246,4,147,84,84,148,23,17,54,38,21,212,20,149,19,183,53,69,236,198,54,5,83,20,164,151,70,166,53,17,247,51,68,87,36,119,148,55,150,101,236,86,179,134,134,36,134,83,101,212,5,17,66,3,102,67,52,246,53,102,102,133,236,246,3,243,131,51,180,84,84,133,151,17,22,3,134,69,181,165,247,196,68,39,236,54,2,68,162,116,148,5,71,180,148,17,54,211,150,245,196,103,3,85,182,117,236,87,19,118,68,20,19,102,165,180,68,17,55,19,134,55,228,149,244,118,116,135,236,51,19,21,70,21,55,164,68,149,102,17,247,18,82,179,5,118,53,52,21,134,236,99,211,179,215,4,229,5,38,149,132,17,211,35,148,198,21,165,35,198,163,70,236,18,35,100,198,53,135,117,117,23,84,17,52,35,181,150,53,36,166,51,133,39,236,198,34,151,39,116,180,118,20,67,85,17,150,211,84,38,245,214,163,68,100,163,236,39,51,179,86,36,23,36,150,148,131,17,38,51,52,242,71,6,103,231,149,36,236,86,51,69,214,196,179,147,38,115,131,17,242,51,4,22,212,36,87,179,150,19,236,4,180,54,22,134,22,116,101,118,150,17,198,36,85,38,52,150,19,149,35,103,236,22,21,55,38,52,244,148,70,71,148,17,70,6,37,54,21,22,214,228,23,53,236,86,54,132,51,20,244,66,99,37,69,17,70,164,236,173,38,57,153,134,250,236,53,154,92,0,209,33,13,223,65,179,75,194,207,88,204,189,70,57,55,219,161,62,119,173,69,99,205,208,223,172,3,52,193,52,0,6,13,77,68,60,191,123,95,197,148,23,226,149,133,22,215,251,63,87,68,22,33,254,93,154,60,126,189,224,9,210,188,110,235,173,162,214,32,112,95,93,61,7,58,189,109,112,208,82,228,51,196,147,73,197,164,98,9,118,207,214,164,124,186,76,135,221,155,153,231,15,210,228,161,103,71,158,165,101,109,59,255,147,154,250,12,190,126,243,233,188,119,251,177,164,87,152,46,217,95,99,80,91,67,40,175,119,146,33,199,73,86,212,15,244,235,123,167,82,37,60,57,147,253,49,228,57,207,113,197,46,108,62,133,185,250,140,161,157,236,198,220,158,210,60,54,58,21,91,231,108,112,250,214,147,6,181,177,166,178,184,182,248,41,210,171,54,23,172,24,112,187,83,58,205,9,144,124,55,87,216,215,97,60,252,238,102,4,47,206,196,10,140,107,148,122,218,242,221,138,51,71,200,231,122,52,124,212,183,84,5,11,158,5,129,101,14,202,2,76,7,118,141,203,19,58,28,129,14,85,48
setBlocks n_blocks_first=10 n_blocks_second=1 n_blocks=11 n_block_words_first=46 n_block_words_second=47 n_block_ec_words=28 total=815
setBlocks block 0 (74): 0,11,22,33,44,55,66,77,88,99,110,121,132,143,154,165,176,187,198,209,220,231,242,253,264,275,286,297,308,319,330,341,352,363,374,385,396,407,418,429,440,451,462,473,484,495,507,518,529,540,551,562,573,584,595,606,617,628,639,650,661,672,683,694,705,716,727,738,749,760,771,782,793,804
setBlocks block 1 (74): 1,12,23,34,45,56,67,78,89,100,111,122,133,144,155,166,177,188,199,210,221,232,243,254,265,276,287,298,309,320,331,342,353,364,375,386,397,408,419,430,441,452,463,474,485,496,508,519,530,541,552,563,574,585,596,607,618,629,640,651,662,673,684,695,706,717,728,739,750,761,772,783,794,805
setBlocks block 2 (74): 2,13,24,35,46,57,68,79,90,101,112,123,134,145,156,167,178,189,200,211,222,233,244,255,266,277,288,299,310,321,332,343,354,365,376,387,398,409,420,431,442,453,464,475,486,497,509,520,531,542,553,564,575,586,597,608,619,630,641,652,663,674,685,696,707,718,729,740,751,762,773,784,795,806
setBlocks block 3 (74): 3,14,25,36,47,58,69,80,91,102,113,124,135,146,157,168,179,190,201,212,223,234,245,256,267,278,289,300,311,322,333,344,355,366,377,388,399,410,421,432,443,454,465,476,487,498,510,521,532,543,554,565,576,587,598,609,620,631,642,653,664,675,686,697,708,719,730,741,752,763,774,785,796,807
setBlocks block 4 (74): 4,15,26,37,48,59,70,81,92,103,114,125,136,147,158,169,180,191,202,213,224,235,246,257,268,279,290,301,312,323,334,345,356,367,378,389,400,411,422,433,444,455,466,477,488,499,511,522,533,544,555,566,577,588,599,610,621,632,643,654,665,676,687,698,709,720,731,742,753,764,775,786,797,808
setBlocks block 5 (74): 5,16,27,38,49,60,71,82,93,104,115,126,137,148,159,170,181,192,203,214,225,236,247,258,269,280,291,302,313,324,335,346,357,368,379,390,401,412,423,434,445,456,467,478,489,500,512,523,534,545,556,567,578,589,600,611,622,633,644,655,666,677,688,699,710,721,732,743,754,765,776,787,798,809
setBlocks block 6 (74): 6,17,28,39,50,61,72,83,94,105,116,127,138,149,160,171,182,193,204,215,226,237,248,259,270,281,292,303,314,325,336,347,358,369,380,391,402,413,424,435,446,457,468,479,490,501,513,524,535,546,557,568,579,590,601,612,623,634,645,656,667,678,689,700,711,722,733,744,755,766,777,788,799,810
setBlocks block 7 (74): 7,18,29,40,51,62,73,84,95,106,117,128,139,150,161,172,183,194,205,216,227,238,249,260,271,282,293,304,315,326,337,348,359,370,381,392,403,414,425,436,447,458,469,480,491,502,514,525,536,547,558,569,580,591,602,613,624,635,646,657,668,679,690,701,712,723,734,745,756,767,778,789,800,811
setBlocks block 8 (74): 8,19,30,41,52,63,74,85,96,107,118,129,140,151,162,173,184,195,206,217,228,239,250,261,272,283,294,305,316,327,338,349,360,371,382,393,404,415,426,437,448,459,470,481,492,503,515,526,537,548,559,570,581,592,603,614,625,636,647,658,669,680,691,702,713,724,735,746,757,768,779,790,801,812
setBlocks block 9 (74): 9,20,31,42,53,64,75,86,97,108,119,130,141,152,163,174,185,196,207,218,229,240,251,262,273,284,295,306,317,328,339,350,361,372,383,394,405,416,427,438,449,460,471,482,493,504,516,527,538,549,560,571,582,593,604,615,626,637,648,659,670,681,692,703,714,725,736,747,758,769,780,791,802,813
setBlocks block 10 (75): 10,21,32,43,54,65,76,87,98,109,120,131,142,153,164,175,186,197,208,219,230,241,252,263,274,285,296,307,318,329,340,351,362,373,384,395,406,417,428,439,450,461,472,483,494,505,506,517,528,539,550,561,572,583,594,605,616,627,638,649,660,671,682,693,704,715,726,737,748,759,770,781,792,803,814
RS calculateSyndroms: Errors found! syndroms = 25,253,40,116,253,33,22,188,60,83,99,71,235,142,197,55,107,125,116,162,183,108,250,30,5,78,162,35
RS berlekampMassey: psi = 1,9,84,157,2,53,240,190,41,243,87,235,23,194,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
RS berlekampMassey: omega = 25,44,137,44,117,51,197,85,90,243,132,93,215,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
RS findRoots: errors=0 locations =
RS correctErrors: could not identify errors
correctErrors in = 64,31,38,135,71,71,7,51,162,242,247,23,34,230,198,150,39,38,86,242,230,54,198,247,86,66,246,22,54,54,87,55,51,247,99,211,18,52,198,150,39,38,86,242,4,198,21,6,54,164,92,88,69,6,226,254,235,189,164,221,165,243,95,73,57,62,210,147,171,144,4,221,84,7
correctErrors out = 64,31,38,135,71,71,7,51,162,242,247,23,34,230,198,150,39,38,86,242,230,54,198,247,86,66,246,22,54,54,87,55,51,247,99,211,18,52,198,150,39,38,86,242,4,198
An expected QRCode would be something like:
When I shorten the text it is working again:
https://xx.xxxxxx.xxxxx/access?v=1#xxxxxx Ladebox AABBCC;xxxxxx-aabbcc;0000-1111-2222-3333;BAPchN1DqT+qCQj0e2YI9hcucAPTHfo8dIghaU+9FKYuK3DPCeSrXL1Xiw7mVnQgZYEtQyJ65OmE5xd84Z/TCtk=|xxxxxx-aabbcc;1234|xxxxxx Ladebox AABBCC;WLANAPPASSWORD|MHcCAQEEIOT8am0Gm12s8FrYyey9ZGxokJYFq9SwnZXrKMapk2AioAoGCCqGSM49AwEHoUQDQgAEA9yE3UOpP6oJCPR7Zgj2Fy5wA9Md+jx0iCFpT70Upi4rcM8J5KtcvVeLDuZWdCBlgS1DInrk6YTnF3zhn9MK2Q==;|
The longest working text seems to be 425 characters. So when it is expected to switch from QRCode version 13 to 14.
https://xx.xxxxxx.xxxxx/access?v=1#xxxxxx Ladebox AABBCC;xxxxxx-aabbcc;0000-1111-2222-3333;BAPchN1DqT+qCQj0e2YI9hcucAPTHfo8dIghaU+9FKYuK3DPCeSrXL1Xiw7mVnQgZYEtQyJ65OmE5xd84Z/TCtk=|xxxxxx-aabbcc;1234|xxxxxx Ladebox AABBCC;WLANAPPASSWORD|MHcCAQEEIOT8am0Gm12s8FrYyey9ZGxokJYFq9SwnZXrKMapk2AioAoGCCqGSM49AwEHoUQDQgAEA9yE3UOpP6oJCPR7Zgj2Fy5wA9Md+jx0iCFpT70Upi4rcM8J5KtcvVeLDuZWdCBlgS1DInrk6YTnF3zhn9MK2Q==;|MEUCIQCICZimFhTKKkGIQYZ
Great library!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.