ideas/suggestions for bar-code printing app
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
ideas/suggestions for bar-code printing app
The company I work for has a small store where employees can purchase tools. Recently I wrote a point of sale system specialized to their needs. I have everything working properly, but I now need a simple way for the users to print bar-code labels when they receive inventory. What I have done so far, is create a system that prints out requisitions for our purchasing department for stock replenishment. That data is also saved so that when the inventory comes in it can be pulled up by requisition number and output to a text file with each line holding the data for one bar-code (bar-code number, item description,price). My thoughts are now to write an app that will read that text file, and print the bar-codes labels. This is where I could use some suggestions or ideas. My idea is to, by use of a template group of labels, a bar-code font, and a nightmare of nested repeat loops, lay out each page to to fit an Avery label style (that I haven't picked out yet) on a hidden card and then print that card, repeating the process until I run out of lines of data. While the concept is simple, and I'm sure i can do it, I just have to wonder if there is an easier way. Has anyone written or come across code that lays out pages to fit Avery labels? Is there some more direct way of communicating with the printer (in Windows 7) that might make it easier?
Re: ideas/suggestions for bar-code printing app
I worked with barcodes in another language, look here: http://rebol2.blogspot.it/search?q=barcode
Rebol wasn't very different from livecode.
Just keep in mind that printing barcodes it's identical to print plain paper, just set the card size to the Avery label size and send to the printer like a normal paper sheet.
Rebol wasn't very different from livecode.
Just keep in mind that printing barcodes it's identical to print plain paper, just set the card size to the Avery label size and send to the printer like a normal paper sheet.

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: ideas/suggestions for bar-code printing app
Thank you. I think I have it all worked out at this point. I don't want to depend on a printer being used that has built in label templates, and since I will be using sheets of 30 labels, I just created a template card with all 30 laid out. Now it is just a matter of filling in the data with a repeat loop 1 page at a time, printing that page, and then changing the visible to false on the leftovers of the last page.MaxV wrote: Just keep in mind that printing barcodes it's identical to print plain paper, just set the card size to the Avery label size and send to the printer like a normal paper sheet.
Re: ideas/suggestions for bar-code printing app
I have this working completely for the most part, but with one small irritation. The repeat loops fill the data into the page of 30 bar-code groups and then prints. Then the next 30 and print again until the end of the list of labels. this is ok, but because each page is a separate print job, there is a long delay between the printing of pages. Is there any way to hold the printable data (print cd 2 from 27,7 to 536,707) as a page and then print all of the pages at the end in one print job? Maybe something like printing to a variable?
Re: ideas/suggestions for bar-code printing app
Try something like this:
- create a seprate substack for printing
- each card of the substack is a printing page
- create a template card
- fill with the data
- then use the command: clone this card
- change the data
- clone this card
- change the data
- ...
- after filling the last page do: go to card 1, print this stack
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: ideas/suggestions for bar-code printing app
Thanks Max. I haven't thought about this much since I posted it. Your solution is certainly more solid than any of the half ideas I had floating around in my head. It means rewriting a lot of what I already have, but I think it will be worth the effort.MaxV wrote:Try something like this:
- create a seprate substack for printing
- each card of the substack is a printing page
- create a template card
- fill with the data
- then use the command: clone this card
- change the data
- clone this card
- change the data
- ...
- after filling the last page do: go to card 1, print this stack
Re: ideas/suggestions for bar-code printing app
I don't think you need to rewrite your printing handler. All you are missing are the two lines of code that prevent each page printing as an individual print job. To start a print job, you use "open printing". That puts everything you print into the print buffer but does not send it to the printer yet. When you issue "close printing", all the collected pages are sent to the printer as a single print job.
So all you need to do is:
open printing [with dialog] -- include the dialog option if you want the user to see the print dialog
-- repeat through all your page printouts here
close printing -- sends the whole thing to the printer at once
That should do what you want. If you want each page to be printed on its own sheet of paper, add a "print break" command at the end of each repeat in the loop. That forces a page break.
So all you need to do is:
open printing [with dialog] -- include the dialog option if you want the user to see the print dialog
-- repeat through all your page printouts here
close printing -- sends the whole thing to the printer at once
That should do what you want. If you want each page to be printed on its own sheet of paper, add a "print break" command at the end of each repeat in the loop. That forces a page break.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: ideas/suggestions for bar-code printing app
That is exactly what I was looking for. I thought I remembered seeing something like that but was not sure and couldn't remember enough to know where to look. Thank you Jacque. You just made my day.jacque wrote:I don't think you need to rewrite your printing handler. All you are missing are the two lines of code that prevent each page printing as an individual print job. To start a print job, you use "open printing". That puts everything you print into the print buffer but does not send it to the printer yet. When you issue "close printing", all the collected pages are sent to the printer as a single print job.
So all you need to do is:
open printing [with dialog] -- include the dialog option if you want the user to see the print dialog
-- repeat through all your page printouts here
close printing -- sends the whole thing to the printer at once
That should do what you want. If you want each page to be printed on its own sheet of paper, add a "print break" command at the end of each repeat in the loop. That forces a page break.
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: ideas/suggestions for bar-code printing app
Hi magice,
I'm looking to do something very similar to this. Did you get it working and if so would you mind sharing?
I'm looking to do something very similar to this. Did you get it working and if so would you mind sharing?
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14