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:

Klicken Sie hier, um die Nutzungsbedingungen für unseren Blog zu lesen.

Leave a Reply

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

Leave the field below empty!

Requests, questions or feedback are welcome:

Terms of use of the comment function in the blog

1. General information

Vectorsoft AG (‘Provider’) provides a public blog for Internet users (‘Users’) on the vectorsoft.de website. The public blog is intended for the exchange of information and ideas. Users who participate with contributions and comments undertake to comply with the blog terms of use and are responsible for the accuracy, appropriateness and freedom from legal infringements of their contributions. By using the comment function in our blog, you accept these terms of use.

2. Netiquette

We ask you to refrain from personal attacks and provocations based on other opinions. Please argue objectively and maintain a constructive discussion culture. Your comment should always be related to the topic in question in order to avoid digressions into other topics. Posting the same comment or several similar comments more than once is not permitted.

3. Prohibition of illegal content

By submitting your comment, you confirm that you are not violating any copyrights or other rights of third parties. Inciting, racist statements, instructions for criminal offences and their glorification, depictions of violence, pornographic content and statements that violate personal rights are prohibited.

4. No advertising

The use of the comment function is not permitted for commercial or party-political purposes. Advertising contributions of any kind will be deleted immediately.

5. Details of the name

When entering your name, pay attention to the principles mentioned above.

6. Source references

If you intend to publish quotes or contributions from third parties, please indicate the respective sources and explain how they relate to the blog post.

7. Violation of the terms of use

Posts that violate this policy will be deleted immediately. If you notice any violations yourself, please send us the link to the comment in question by e-mail to . We expressly point out that we will exclude individual users in the event of repeated or serious violations of these terms of use.

As of: Sept. 2024

Get your Trial Version now!

Test yeet free of charge

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