Convert serial number to Hex

We have generated an 8-digit serial number from the serial scheme. This works great!

However, we need to print the serial number in HEX e.g. if serial number is 12345678, then the print out on the Order Serial Label should look like BC-61-4E

How can this be done in Template Toolkit?

@cetec_evt Broadly speaking, the custom docs in cetec are taking the existing data out of the system and using it to populate generated PDF files.

So unless you’re already storing the Hex version of the serial somewhere, I’m not sure there is a way for the custom doc to do that conversion for you.

We’d be happy to check with our engineering team to confirm that for you. In order to do so, we’d need to know how you’re extracting that hex code from the 8-digit number currently.

Currently, we are using a labeling software to achieve this.

Which software are you using?

BarTender Software

This is doable. You can use javascript to covert to Hex. If you require breaking up the hex with hyphens then that would require some additional string parsing/formatting. But, all doable using JS within the custom doc file.

If you need help customizing the file, we can have an engineer work with you on it at $250/hr. Reach out to and reference this forum post if you want to work with our engineering team on this.