cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Generate QR code

SB_9732186
12-Amethyst

Generate QR code

Hi all,

 

I have a STRING field, using which I have to generate a QR Code that has to be printed later.

Is there any way to generate a QR Code in Thingworx 9.2.3

 

Thanks in advance,

Sujith

ACCEPTED SOLUTION

Accepted Solutions
CharlesJi
15-Moonstone
(To:SB_9732186)

Hi @SB_9732186, you can try to use the QR Code generate API from other websites, e.g., Google QR Code (https://developers.google.com/chart/infographics/docs/qr_codes).

 

In ThingWorx, you can simply create a service with the following to get a QR Code with 200x200 size saying "Hello_World":

let params = {
	proxyScheme: undefined /* STRING {"defaultValue":"http"} */,
	headers: undefined /* JSON */,
	ignoreSSLErrors: undefined /* BOOLEAN */,
	useNTLM: undefined /* BOOLEAN {"defaultValue":false} */,
	workstation: undefined /* STRING {"defaultValue":""} */,
	useProxy: undefined /* BOOLEAN {"defaultValue":false} */,
	proxyHost: undefined /* STRING {"defaultValue":""} */,
	url: "https://chart.googleapis.com/chart?cht=qr&chl=Hello_world&choe=UTF-8&chs=200x200" /* STRING */,
	timeout: undefined /* NUMBER {"defaultValue":60} */,
	proxyPort: undefined /* INTEGER {"defaultValue":8080} */,
	password: undefined /* STRING */,
	domain: undefined /* STRING {"defaultValue":""} */,
	username: undefined /* STRING */
};

// result: IMAGE
let result = Resources["ContentLoaderFunctions"].LoadImage(params);

 

CharlesJi_0-1653375278388.png

 

View solution in original post

1 REPLY 1
CharlesJi
15-Moonstone
(To:SB_9732186)

Hi @SB_9732186, you can try to use the QR Code generate API from other websites, e.g., Google QR Code (https://developers.google.com/chart/infographics/docs/qr_codes).

 

In ThingWorx, you can simply create a service with the following to get a QR Code with 200x200 size saying "Hello_World":

let params = {
	proxyScheme: undefined /* STRING {"defaultValue":"http"} */,
	headers: undefined /* JSON */,
	ignoreSSLErrors: undefined /* BOOLEAN */,
	useNTLM: undefined /* BOOLEAN {"defaultValue":false} */,
	workstation: undefined /* STRING {"defaultValue":""} */,
	useProxy: undefined /* BOOLEAN {"defaultValue":false} */,
	proxyHost: undefined /* STRING {"defaultValue":""} */,
	url: "https://chart.googleapis.com/chart?cht=qr&chl=Hello_world&choe=UTF-8&chs=200x200" /* STRING */,
	timeout: undefined /* NUMBER {"defaultValue":60} */,
	proxyPort: undefined /* INTEGER {"defaultValue":8080} */,
	password: undefined /* STRING */,
	domain: undefined /* STRING {"defaultValue":""} */,
	username: undefined /* STRING */
};

// result: IMAGE
let result = Resources["ContentLoaderFunctions"].LoadImage(params);

 

CharlesJi_0-1653375278388.png

 

Announcements


Top Tags