none
Application Design: Sending Data to multiple unknown devices RRS feed

  • Question

  • We have a program that is associated with a custom extension used just by us. Our website generates this file and then the program takes over and prints the contents of the file on the printer. We have always used the same type of printer everywhere so the file that the website generates contains the exact code that needs to be sent to the printer. We are now starting to order some additional printer types so I need to change my desktop program around to be able to handle any printer type our customers use. The problem is I am not sure of the best way to do this as the items that are printed sometimes have special things that have to be listed in a certain structure. An example would be certain products require us to put a certain tag line under the product name where others make us put the vendor under the tag line and its always changing.

     

    My first thought was to have the website send a XML file that specify's the values of fields of each product they are going to be printing (they could print 500-2000 products per an order but its usually 2-6). Than I can include the format of each printer type that is supprted with the print code for that printer and then I just have to replace the variables. The problem with this, is I speed is an issue and as I add more printers to be supported the file will be bigger and bigger which of course will take it longer to download.

     

    <RC7,216><HW2,2><F2>  Order: {OrderID} Order Amount: {OrderAmt}  
    <RC35,216><HW4,2><F5>{OrderBuyerLastName}
    <RC140,216><HW4,2><F5>{OrderBuyerFirstName}

     

    My second idea is to send through the data of just the variables, and then a format reference. It will then look on their local computer for this reference file and if its there it will use it. If its not, it will call a url on my site and return the reference file so it can then store it for future print jobs. This does seem like it would be the best option for me, but I wanted to throw it out there to see if anyone else has any other sparks of creative jean inside them and come up with something different and new.

     

    Maybe a little more details, is that I could have the program register inside IE and Firefox as an extension and add JS to the page so it can pass back to the site when the link is clicked on what type of printer is connected, but I would not like to limit them to a browser and would like to take things out of the end users system control if possible.

    Thursday, August 12, 2010 4:58 AM

All replies

  • Just a thought, but could the format to create a PDF file or some other "standard" document? If you used PDF, you could include all of your custom formatting and not have to worry about the printer used by the client.

    Paul


    Paul Delcogliano
    Tuesday, August 17, 2010 5:49 PM
  • If it was a normal printer I could see this being an option, but its different types of receipt printers and things just like receipt printers.
    Thursday, August 19, 2010 4:56 PM