No announcement yet.

Adding Code39 barcodes into PDF generated by Mirth Connect.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding Code39 barcodes into PDF generated by Mirth Connect.


    Recently I have needed to output barcodes in PDF’s generated from Mirth. I’ve seen plenty of discussion around this, but not a clear solution. I did have success with using a TrueType Code39 font, but as the font wasn’t embedded in the PDF itself, the same font needed to be installed everywhere the PDF was going to be viewed which was not practical for me.

    Using an article from Code Project about creating barcodes using HTML, CSS and Javascript (, I have been able to come up with a working solution.

    Rather than embedding the Javascript into the HTML generated as the article outlines, I used the Javascript in the transformer itself (In production, these functions would be put into a code template library). I also simplified the Javascript by removing parts of it I didn’t require (like human readable output and check digit).

    Attached is a working channel for Mirth Connect v3.5.1 that simply output’s ORC-4 as a barcode, and a sample PDF that was generated.


    Attached Files
    Last edited by SHague; 10-22-2017, 04:26 PM. Reason: Oops - left off the PDF sample!

  • #2
    Thanks for sharing!


    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

    Appliance Version 3.11.4
    Mirth Connect Version 3.8.0
    Java Version 1.6.0_45-b06
    Java (64 bit) Version 1.6.0_45-b06
    Java 7 (64 bit) Version 1.7.0_151-b15
    Java 8 (64 bit) Version 1.8.0_181-b13
    PostgreSQL Version 9.6.8