IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#50087 - 11/10/14 05:57 PM Carriage return in QR code?
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
I'm attempting to add carriage returns in a QR barcode. I'm using the custom data selection property to build the barcode value. I've found various documentation on the web that states it's doable by adding a "013" or "%0D" escape string between my other values. When I do that like so:
Code:
='%0D'
It's interpreted as a literal string, not a carriage return.

I've also tried using the CHAR function, but it doesn't change the output at all.

Is there a way to add a carriage return to QR codes via PlanetPress?

Thanks!

Top
#50095 - 11/11/14 09:04 AM Re: Carriage return in QR code? [Re: -nth-]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi nth,

In PlanetPress Design, it should be a "\" that you add for control characters. So if you put "\015", it should insert a CR.

Notice I've used "\015" instead of "\013". That's because PlanetPress uses octal values, not decimal.

Regards,
Raphaël Lalonde Lefebvre

Top
#50106 - 11/11/14 05:51 PM Re: Carriage return in QR code? [Re: -nth-]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Ok I still must be doing something wrong.

Here's my Presstalk code for generating the sample QRcode:
Code:
define(&_DataSel_,string,'This is line one.')
set(&_DataSel_,&_DataSel_ + '\015')
set(&_DataSel_,&_DataSel_ + 'This is line two.')
showbarcodeqrcode(&_DataSel_,0,0,16)


The barcode it generates has no carriage return - the two lines just run together.

I thought maybe it was my scanning app, so I've tested with a couple of them (ScanLife and Barcode Scanner). They show the same thing; the lines run together.

Any other ideas?

Thanks,
-Nate

Top
#50119 - 11/13/14 04:18 PM Re: Carriage return in QR code? [Re: -nth-]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
For testing purposes here's what PlanetPress produces with the Presstalk code above:



Here's one created from qrstuff.com with the same two lines of text:



The qrstuff adds the carriage return between lines, PlanetPress doesn't.

Top
#50142 - 11/18/14 09:49 AM Re: Carriage return in QR code? [Re: -nth-]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Thought I'd document the fix for this.

With the help of OL support this has been resolved. Turns out a line feed character is needed as well as the carriage return. So the CR would be '\015' and the LF would be '\012'.

The correct code from my example above would be:
Code:
define(&_DataSel_,string,'This is line one.')
set(&_DataSel_,&_DataSel_ + '\015'+'\012')
set(&_DataSel_,&_DataSel_ + 'This is line two.')
showbarcodeqrcode(&_DataSel_,0,0,16)


-Nate

Top