New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

How to use the Data Matrix Header File in C++ Project

How to encode data for the Data Matrix barcode font using the Data Matrix Header File supplied with the Developer License of the Data Matrix/GS1-DataMatrix Font Package.

Operating System: Visual Studio

08-07-20     3.6 year(s) ago    

  Report Abuse

 

Ben

Best Answer

This tutorial explains how to use the IDAutomationDataMatrix.h font encoder to encode data for Data Matrix. The example uses Visual Studio C++ Windows Console Application to display the encoded data. The header file is only included with the purchased version of the Developer License of the Data Matrix Font and Encoder.

1. Purchase and download the Data Matrix Font and Encoder and the download the Developer Tools. The Header file is located at:

2. Run Visual Studio (the example uses VS2017).

3. Select File - New - Project.

4. Select Visual C++ - Windows Desktop. Choose Windows Console Application.

5. Name the project and select OK.
image

6. Access the Developer Tools and copy the IDAutomationDataMatrix.h file to your project directory.
image

7. Within the Solution Explorer, right-click Header Files - Add - Existing Item. Select the .h file and choose Add.
image

After the Header file is imported:
image


8. At the top of the .cpp file, enter #include <iostream>, #include "IDAutomationDataMatrix.h", and using namespace std;
image

9. Within main(), enter:
image
cout<< IDAutomation_DMFontEncode("1234567890", false,3,0) << std::endl;
cin.get();
return 0;


10. Build and Run the project. The output is encoded data for Data Matrix.
image

NOTE:
If the data appears on one line within the console output, return to the header code on line 787 and add a new line (slash n):

image


Using ~#
~1
]d2 or <GS> which is FNC1

~2 structured append

~3 reader programming

~5
~5123456789
]d1[)><RS>05<GS>123456789<RS><EOT>

~6
~6123456789
]d1[)><RS>06<GS>123456789<RS><EOT>

IDAutomation recommends testing the result with the Barcode Decoder App because it reveals the RS, GS, and EOT functions to verify proper encoding.

Posted 3.6 year(s) ago

(1)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.

Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook