Based on the Kendo UI QRCode documentation, adjusting the size of the QR code requires utilizing the size
parameter in pixels, like so:
$("#qrcode").kendoQRCode({
value: "#test",
size: 300
});
This will result in a QR code with dimensions of 300px by 300px.
Additionally, as per the qrcode.js documentation, you can set the size of the QR code using the width
and height
parameters as seen below:
var qrcode = new QRCode("qrcode");
var qrcode = new QRCode("test", {
text: "http://jindo.dev.naver.com/collie",
width: 400,
height: 400,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
In this instance, the resulting QR code's dimensions will be 400px by 400px.
To address the question regarding the absence of generated QR codes now compared to earlier duplications, it seems that the current issue lies in the incorrect implementation of generating QR codes using Kendo UI QRCode. The following snippet seems to be flawed:
$("#qrcode").kendoQRCode({
$("#text").on("keyup", function () {
qrcode.makeCode($(this).val());
}).keyup().focus();
});
The mentioned scenario attempts to create a QR code through Kendo UI QRCode but includes improper arguments (an event listener used for the first QR code generation). Reviewing the console might reveal errors within this section of the code.
Reverting to the original code structure and including the appropriate size
or width
/height
parameters per the documentation is recommended.
Responding to OP's request, here is a functional code snippet enabling QR code size adjustment using qrcode.js:
var qrcode = new QRCode("qrcode", { width:100, height:100 });
$("#text").on("keyup", function () {
qrcode.makeCode($(this).val());
}).keyup().focus();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://davidshimjs.github.io/qrcodejs/qrcode.min.js"></script>
<input id="text" type="text"/>
<div id="qrcode"></div>
You may observe its functionality on this JSFiddle link: http://jsfiddle.net/ysffjujh/1/. By simply updating the values of height
and width
, different-sized QR Codes can be generated effortlessly.