Workflow Soluiton

 View Only
Expand all | Collapse all

Create barcode from text?

John Atkins

John AtkinsMay 13, 2013 04:48 PM

  • 1.  Create barcode from text?

    Posted May 02, 2013 11:19 AM

    Is there a way to have workflow take a string of text that is entered by the user of the form and display it as a barcode?  Any help would be appreciated.

     

    Thanks,

    John



  • 2.  RE: Create barcode from text?

    Posted May 02, 2013 11:47 AM

    We actually have a Barcode component library in the codebase, but it's never been delivered. Unsure why - more than likely it's pretty "raw".

    There's probably some freeware web services out in the wild you could generate against to get some components.



  • 3.  RE: Create barcode from text?

    Posted May 02, 2013 12:32 PM

    There are several public webservices you can access that will take in text and output a barcode. One that comes to mind is http://www.barcodesinc.com/generator/index.php .

    This one allows test to be submitted via a URL, which generates the barcode:

     

    http://www.barcodesinc.com/generator/image.php?code=This%20is%20a%20test&style=197&type=C128B&width=200&height=50&xres=1&font=3

     

    Enter your text after the Code= (example says This is a test)

     

    They also have a barcode font that you can download for free which should allow you to print out barcodes should you need it.

     

    rob



  • 4.  RE: Create barcode from text?

    Posted May 02, 2013 04:07 PM
      |   view attached

    I've actually got the "raw" comp right here in the attached. Basically I just used the defaults and it spits out a FileDataType. A Write File after that got the image (C:\myfile.tiff) to my hard drive.

    NOTE: I built this against the trunk of the codebase. If it doesn't work for you, let me know and I'll try and build it against a "lesser" version of WF. Note that this comp come "as is"- and I'm pretty sure it implements the barcode font mentioned below.

     

    Attachment(s)



  • 5.  RE: Create barcode from text?

    Posted May 03, 2013 10:05 AM

    I'm not sure how to use this.  I added it to a web forms project and then double clicked on it and I get an error.



  • 6.  RE: Create barcode from text?

    Posted May 03, 2013 10:17 AM

    Which version of WF are you using? (you can right click on a component DLL and go to Details to get it)



  • 7.  RE: Create barcode from text?

    Posted May 03, 2013 10:21 AM

    How do you add a font to workflow?  I downloaded a barcode font and installed it in Windows and it still does not show up in Workflow.

     

    Nevermind.  I had to close Workflow and reopen for the fonts to show up.  Thanks.



  • 8.  RE: Create barcode from text?

    Posted May 10, 2013 04:28 PM

    Well I thought I had this until I ran the form from a different system and realized the every system that will run this form will not have the barcode font.  Is there a way to add this font into the webpage?  I can not install the barcode font on all these computers.

     

    Or does anyone have another idea?



  • 9.  RE: Create barcode from text?

    Posted May 12, 2013 04:55 PM

    My handcoded comps above have the font we're talking about included as a resource. If you give me your WF version, I can probably build my comps against that version.



  • 10.  RE: Create barcode from text?

    Posted May 13, 2013 04:48 PM

    Ver 7.1.0140.119



  • 11.  RE: Create barcode from text?

    Posted May 14, 2013 07:41 AM
      |   view attached

    I'm assuming you meant 1400 here, which is SP1. Attached is the barcode comp built against the SP1 rollup branch... hopefully this works out better.

     

    Attachment(s)



  • 12.  RE: Create barcode from text?

    Posted May 14, 2013 10:19 AM
      |   view attached

    I still get this error after adding the componet in my web form workflow.

     



  • 13.  RE: Create barcode from text?

    Posted May 14, 2013 11:31 AM
      |   view attached

    Oh, the joys of working across heavily-rearchitected versions

    Try the new attached version

    I don't have an SP1 machine up, so I'm coding this pretty blind. All I have is a trunk version and I'm basically just pushing code back.

     

    Attachment(s)



  • 14.  RE: Create barcode from text?

    Posted May 14, 2013 11:47 AM

    Now we are getting somewhere.  I can edit and work with this one, but is there any way to have the code come from a variable.



  • 15.  RE: Create barcode from text?
    Best Answer

    Posted May 14, 2013 01:27 PM

    Just sent you a private message. The comp in that lib should let you specify vars in the input.