Scan me

In blog post Erzeugen von Barcodes, we have already introduced the barcode generator in the form of the PrtBarcode object. Today’s article is about Quick Response Code (QR code). In the following, we would like to discuss some possible uses and show which data must be transferred to the PrtBarcode object in order to obtain a valid QR code.

History

The QR code was developed in Japan in 1994 by the Toyota subsidiary “Denso” for marking components in the automotive industry.

Structure / Features

The QR code belongs to the group of matrix codes. Compared to other barcodes, the QR code has a high storage capacity and can hold up to 4296 characters. In addition, the code works with error correction so that the code remains readable even up to a certain degree of soiling or damage.

Distribution

Originally developed for the manufacturing and logistics industry, the QR code can be found in many different areas of life. Due to the rapid spread of smartphones in particular, the QR code is one of the most frequently used codes.

Areas of application

The range of applications is very diverse. It ranges from simple redirection to a website to payment for products and services. We would like to present three applications as examples.

Redirecting to a website
The simplest application is probably encoding a web address in the QR code. To do this, the URL is passed to the caption property of the PrtBarcode object. To ensure that the QR reader interprets the information not just as a message but as a website, the URL including http:// bzw. https:// must be defined.

// Open print job
tJob # PrtJobOpen('QRCode', '', _PrtJobOpenWrite | _PrtJobOpenTemp);
if (tJob > 0)
{
  tDoc # tJob->PrtInfo(_PrtDoc);
  // Determine PrtBarcode object
  tBCode # tDoc->PrtSearch('PrtBarcode');
  // Set error correction to level Q
  tBCode->ppCorrectionLevel # 2;
  // Use barcode type QR
  tbCode->ppTypeBarcode # _WinBarcode2dQRCode;
  // Define URL
  tBCode->ppCaption # 'http://www.vectorsoft.de/Blog';
  ...
  ...
}
http://www.vectorsoft.de/Blog

As already mentioned, the QR code uses a correction level. There are four such levels in total:

Level L: a maximum of 7 percent error correction
Level M: a maximum of 15 percent error correction
Level Q: a maximum of 25 percent error correction
Level H: a maximum of 30 percent error correction

The percentage indicates that the data can still be reconstructed even if the code data is damaged or unreadable up to the defined value.

In the example above, the property ppCorrectionLevel
property to set the correction level of the QR code to “Q”. We have chosen this because the barcode is covered by an image and therefore areas of the code cannot be read.

From the upcoming conzept 16 version 5.7.09, it will be possible to specify the desired error correction level via the ppCorrectionLevel property.

QR code on the business card
In the following example, contact data is saved in vCard format. The vCard is a standardised file format for saving and exchanging contact data. The data can be transferred to the phone book of the cell phone by scanning the code.

tBcode->ppCaption # 'BEGIN:VCARD'
         + sCRLF  + 'VERSION:3.0'
         + sCRLF  + 'N:Schramm;Andreas'
         + sCRLF  + 'FN:Andreas Schramm'
         + sCRLF  + 'ORG:vectorsoft AG'
         + sCRLF  + 'TEL;WORK;VOICE:+49 6104 660-300'
         + sCRLF  + 'EMAIL:'
         + sCRLF  + 'END:VCARD';
Contact details in vCard format

Payment of invoices by GiroCode
The GiroCode is a QR code that contains all the necessary transfer data such as BIC, IBAN, recipient etc.. With an appropriate banking app, the data can be automatically transferred to the transfer form.

// Correction level M
tBCode->ppCorrectionLevel # 1;
tBCode->ppCaption # 'BCD'                         // Service identifier
          + sCRLF + '001'                         // Version
          + sCRLF + '1'                           // Coding
          + sCRLF + 'SCT'                         // Function
          + sCRLF + 'HELADEF1OFF'                 // BIC
          + sCRLF + 'Müller, Jakob'               // Name
          + sCRLF + 'DE12505500200999999999'      // IBAN
          + sCRLF + 'EUR50';                      // Amount
GiroCode
Further information on vCard and GiroCode:

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Your yeet Trial Version - request it now!

TEST yeet - NON-BINDING and FREE OF CHARGE

Deine yeet Trial Version - jetzt anfordern!

TESTE yeet - UNVERBINDLICH und KOSTENFREI

IHRE EVALUIERUNGSLIZENZ - JETZT ANFORDERN!

TESTEN SIE DIE CONZEPT 16 VOLLVERSION - UNVERBINDLICH und KOSTENFREI

Subscribe to our newsletter

[cleverreach_signup]
WordPress Cookie Notice by Real Cookie Banner