Classic ASP Requires Chilkat v11.7.0+
Classic ASP
Get the QR Code Capabilities of the Chilkat Version in Use
See more QR Code Examples
Demonstrates the capabilities operation, which describes what the installed version of Chilkat can do: the range of QR versions, the error-correction levels, the operations, the image formats and the limits. A program can check for a feature here instead of testing for a Chilkat version number. The request can be an empty JSON object.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
set json = Server.CreateObject("Chilkat.JsonObject")
set fmt = Server.CreateObject("Chilkat.Formats")
set jsonOut = Server.CreateObject("Chilkat.JsonObject")
success = fmt.QrCode("capabilities",json,jsonOut)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( fmt.LastErrorText) & "</pre>"
Response.End
End If
Response.Write "<pre>" & Server.HTMLEncode( "Chilkat version: " & jsonOut.StringOf("productVersion")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "symbology: " & jsonOut.StringOf("symbologies[0].id")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "QR versions: " & jsonOut.IntOf("symbologies[0].encoding.version.min") & " to " & jsonOut.IntOf("symbologies[0].encoding.version.max")) & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "structured append, most symbols: " & jsonOut.IntOf("symbologies[0].structuredAppend.maxSymbols")) & "</pre>"
n = jsonOut.SizeOfArray("symbologies[0].encoding.errorCorrection")
For i = 0 To n - 1
jsonOut.I = i
Response.Write "<pre>" & Server.HTMLEncode( "error correction: " & jsonOut.StringOf("symbologies[0].encoding.errorCorrection[i]")) & "</pre>"
Next
' The operations this version implements.
n = jsonOut.SizeOfArray("operations")
For i = 0 To n - 1
jsonOut.I = i
If (jsonOut.BoolOf("operations[i].available") = 1) Then
Response.Write "<pre>" & Server.HTMLEncode( "operation: " & jsonOut.StringOf("operations[i].name")) & "</pre>"
End If
Next
n = jsonOut.SizeOfArray("imageFormats.output")
For i = 0 To n - 1
jsonOut.I = i
Response.Write "<pre>" & Server.HTMLEncode( "image format: " & jsonOut.StringOf("imageFormats.output[i]")) & "</pre>"
Next
Response.Write "<pre>" & Server.HTMLEncode( "default timeout: " & jsonOut.IntOf("limits.timeoutMs.default") & " ms") & "</pre>"
Response.Write "<pre>" & Server.HTMLEncode( "default largest image: " & jsonOut.IntOf("limits.maxPixels.default") & " pixels") & "</pre>"
' Sample output:
' Chilkat version: 11.7.0
' symbology: qr
' QR versions: 1 to 40
' structured append, most symbols: 16
' error correction: auto
' error correction: L
' error correction: M
' error correction: Q
' error correction: H
' operation: generate
' operation: measure
' operation: validate
' operation: capabilities
' image format: png
' image format: svg
' default timeout: 10000 ms
' default largest image: 16777216 pixels
%>
</body>
</html>