web stats
How to output a Barcode - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2016, 12:45 PM
jg12345 jg12345 is offline
OBX.3 Kenobi
 
Join Date: Oct 2012
Posts: 106
jg12345 is on a distinguished road
Default How to output a Barcode

I'm using Document Writer to output a few HL7 fields to a PDF file using HTML in the Template area. How can I output (for example) ORC-2.1 to show as a barcode? Maybe someone has an example of this?
Reply With Quote
  #2  
Old 05-25-2016, 02:17 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Not too familiar with it, but maybe this will help: https://github.com/lindell/JsBarcode
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 05-26-2016, 06:07 AM
lionelroux lionelroux is offline
OBX.2 Kenobi
 
Join Date: Apr 2013
Posts: 82
lionelroux is on a distinguished road
Default

In your document output template simply create a style like the following

Code:
.barcode{ font-family:'Free 3 of 9', '39251'; }
and then in the document :

Code:
<p class="barcode">1234567</p>
It will render PDF document using this 3 of 9 barcode font.
You can use other barcode fonts like 128, etc...
Reply With Quote
  #4  
Old 05-26-2016, 07:32 AM
jg12345 jg12345 is offline
OBX.3 Kenobi
 
Join Date: Oct 2012
Posts: 106
jg12345 is on a distinguished road
Default

I installed Free 3 of 9 font and tried your example, but can't get it to work.
Can you please provide some more info on how to do this or possibly an attached example?
Reply With Quote
  #5  
Old 05-28-2016, 01:16 PM
lionelroux lionelroux is offline
OBX.2 Kenobi
 
Join Date: Apr 2013
Posts: 82
lionelroux is on a distinguished road
Default

Have a look at this post , its interesting :

http://www.mirthcorp.com/community/f...ad.php?t=11767

It seems iText, the underlying API internally used to render PDF, is pretty dumb ;-)

The way I mentionned previously use CSS only and it depends on fonts installed on the machine.
Reply With Quote
  #6  
Old 06-03-2016, 09:41 AM
jg12345 jg12345 is offline
OBX.3 Kenobi
 
Join Date: Oct 2012
Posts: 106
jg12345 is on a distinguished road
Default

Thanks Lionelroux.... but i see narupley replied in another thread that Mirth does not look at local fonts installed on the PC.

Still trying to find a solution to output the barcode.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation