Jump to content

2D DataMatrix Barcode


AWhite2504

Recommended Posts

Hello,

 

I need to create a 2D barcode using DataMatrix that will be read by cameras on our inserter.

 

The barcode will need to enlist:

Job #:***XX Example:00001

Record #:****** Example:000001

Member ID:******X Example:1234567

Page #:***X Example 01,02,03

 

Example: 00001000001123456701

Link to comment
Share on other sites

Something like this:

var data = FormatNumber("00000", Field("Job #"));
data += FormatNumber("000000", FusionPro.Composition.inputRecordNumber);
data += FormatNumber("0000000", Field("Member ID"));
data += FormatNumber("00", FusionPro.Composition.currentPageNumber);
return MakeDataMatrixBarcode(data);

Make sure to check both "Treat returned strings as tagged text" and "Re-evaluate this rule for every text flow".

Link to comment
Share on other sites

Preferably these dimensions:

pointSize = 6;

preferredFormat = 48;

There's no format 48. You probably want format 13, which yields 48X48. The formats are listed here:

https://www.barcodefaq.com/2d/data-matrix/#DataMatrix_Formats

 

Though generally, if you don't specify the format, the barcode will be made as small as possible, so specifying a format may actually make it larger.

 

Anyway, change the last line to something like:

return MakeDataMatrixBarcode(data, 0, 0, 13, 6);

Or:

var DM = new DataMatrixBarcode;
DM.pointSize = 6;
DM.preferredFormat = 13;
return DM.Make(data);

Link to comment
Share on other sites

  • 1 month later...
Dan,

Instead of using page number I need sheet number. Is this possible?

Sure, use FusionPro.Composition.impositionSheetNumber. See:

http://forums.pti.com/showpost.php?p=13793&postcount=3

 

I imagine you'll also probably want to use the custom imposition sheet background feature, to place the barcode once on the imposed sheet, rather than on each page on the sheet. See the section "Imposition Background Sheet" section in the Rules Guide, and:

http://forums.pti.com/showpost.php?p=11530&postcount=3

Link to comment
Share on other sites

When using the FusionPro.Composition.impositionSheetNumber., the output is always 01.

You need to do these things:

  1. Check the "Re-evaluate this rule for every text flow" box.
  2. Compose with imposition enabled (not just click Validate in the Rule Editor).

Also, are you sure you're looking at a page that's on a sheet other than sheet 1? This is why I mentioned that you probably want to put this barcode down once per sheet, on a custom imposition sheet background, rather that once per-page or per-record.

Link to comment
Share on other sites

Upon composing, I figured out the numbers that are supposed to represent the sheet number are reflecting the record number.

Here is the rule:

var data = FormatNumber("00000", Field("Job #"));

data += FormatNumber("000000", FusionPro.Composition.inputRecordNumber);

data += FormatNumber("0000000", Field("V01_MEMBER_ID"));

data += FormatNumber("00", FusionPro.Composition.impositionSheetNumber);

return MakeDataMatrixBarcode(data, 0, 0, 4, 4);

Link to comment
Share on other sites

Upon composing, I figured out the numbers that are supposed to represent the sheet number are reflecting the record number.

Okay... I'm not sure if you're saying that's an issue. If you're using a one-up imposition, then I would expect that the sheet number would match the record number. If not, well, then, it depends on how your imposition is set up, and there are countless possibilities. So, if you want this to be looked at further, you would need to at least post the FPI file, if not the whole template. Also, this is getting off the topic of this thread, which is about DataMatrix barcodes. So I would suggest starting a new thread with any imposition-specific questions.

Edited by Dan Korn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...