Topic Options
#58104 - 07/13/21 10:41 AM Regarding QR Code
De12345 Offline
OL Newbie

Registered: 09/14/18
Posts: 15
Hi,
Trying to generate QR code based on the URL below but once the QRcode is generated the last digit gets replaced by some random value
Tried Barcode Mode to Full still the last digit on the url changes to 5.
https://xyz.com/en-gb/test/DB 15639102

Settings are as below :
Barcode Type = QR COde
Bar width = 27
Mode = Full
Error Correction Level = Level L

Below code in Press Talk After :
define(&marknumber,string,XmlGet('/root[1]/documents[1]/document[1]/pages[1]/page[1]/add[5]/@value'))
define(&url,string,XmlGet('/root[1]/documents[1]/document[1]/downloadUrl[1]/@value'))
showbarcodeqrcode(&url +'/'+ &marknumber,0,0,27)

Top
#58105 - 07/13/21 12:51 PM Re: Regarding QR Code [Re: De12345]
Philippe F. Online   content
OL Expert

Registered: 09/06/00
Posts: 1972
Loc: Objectif Lune, Montreal, Qc
Not quite sure why you're going thorugh the trouble of adding PressTalk After code in there.

Instead, remove that code and go into the data section of the barcode object and tick the Custom data selection option.
Add the following three lines to the String to display parameter:
Code:

=XmlGet('/root[1]/documents[1]/document[1]/downloadUrl[1]/@value')
='/'
=XmlGet('/root[1]/documents[1]/document[1]/pages[1]/page[1]/add[5]/@value')


It works fine like that on my end.
Note that your final URL contains a space (.../DB 15639102), which is never a good idea in any URL as devices may only read until the first blank character and therefore truncate the URL.

Note also that I have deleted your duplicate post. You should only post a question once, in a single forum.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#58106 - 07/14/21 01:55 PM Re: Regarding QR Code [Re: De12345]
De12345 Offline
OL Newbie

Registered: 09/14/18
Posts: 15
Great Thanks Custom data Selection worked fine.

Henceforth will make sure to avoid duplicate post in the forum.
Thanks again.

Top