Jump to content

Auto formatting 27 digit 2D barcode


Dmiller35

Recommended Posts

On more complex jobs, we need to use a 27 digit barcode.

In the code I need to specify which sheets are being pulled and the total quantity. for example, "0103" will be on sheet 1 of 3, "0203" is on sheet 2.

Currently I've just been making a separate rule for each sheet, but is there a way to format it so it can pull the sheet number and total number of sheets?

I've looked at other threads but couldn't find a solution that worked.

 

*Edit. I did find one that was close but there was some confusing info there.

This was suggested to be used.

var TotSheets = FormatNumber( "00", FusionPro.Composition.impositionTotalSheets );
var CurrSheet = FormatNumber( "00", FusionPro.Composition.impositionSheetNumber );

The OP from that post wasn't using imposition but I am. Will this work for me? Our sheets will print 2up on 11x17 and be cut down to 8.5x11. Just want to make sure the codes will come out correctly when cut down.

Edited by Dmiller35
Link to comment
Share on other sites

Okay, so that doesn't work.

To be clear, Each finished 8.5x11 sheet will have a barcode on it. Currently, the file I'm working with is a 10 page letter, printed duplex to be 5 sheets. I already have a field in the barcode that will call for the record number.

Here's what I've come up with and it appears to work.

var TotSheets = FormatNumber( "00", 5);
var CurrSheet = FormatNumber( "00", ((FusionPro.Composition.currentPageNumber+1)/2) );

The total sheet count will only change if I use this code on another job so I just made it fixed. For the current sheet, I just decided to pull the current page number add 1 and then divide by 2 so get the actual sheet. So page 3 will display as sheet 2, page 5 displays as sheet 3, and so on.

Is this my best solution or is there something I'm missing?

Link to comment
Share on other sites

The OP from that post wasn't using imposition but I am. Will this work for me?

What post specifically?

Is this my best solution or is there something I'm missing?

Well, I don't really know what you're missing, because other than a few lines of code, I don't know what you already have. This would be a lot easier to analyze if you posted the job files.

 

A few questions, though.

 

One, did you check the "Re-evaluate this rule for every text flow" box?

 

Two, have you tried putting the barcode onto a custom imposition sheet background, rather than directly onto an output page?

 

Three, are you using stacked imposition? If not, then FusionPro doesn't automatically do preprocessing to calculate the total numbers of records, sheets, and stacks. You might need to add this to OnJobStart:

FusionPro.Composition.forcePreprocessing = true;

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...