473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Printing Barcodes from webapp?

Hello Group:

I am in the planning stages of an application that will be accessed
over the web, and one of the ideas is to print a barcode that is
generated when the user creates a record. The application is to track
paperwork/items and uses barcodes to easily identify which paper/item
belongs to which record.

Is there an easy way to generate barcodes using Python -- considering
the application will be printing to a printer at the client's machine?
I thought of two ways this could be done; one would be to interface
with the printing options of the browser to ensure that margins,
headers, footers are setup properly (I have done this before using
activex and IE, but with mixed results); the other would be to install
some small application at the client machine that would intercept the
print jobs and format them properly (taking the printing function away
from the browser).

Does anyone have any experience or advice? Any links I could read up
on to help me find out how to program this? Another way (easier
hopefully) to accomplish this?

Thanks for any advice.

Dec 2 '06 #1
7 2352

Burhan wrote:
Hello Group:

I am in the planning stages of an application that will be accessed
over the web, and one of the ideas is to print a barcode that is
generated when the user creates a record. The application is to track
paperwork/items and uses barcodes to easily identify which paper/item
belongs to which record.

Is there an easy way to generate barcodes using Python -- considering
the application will be printing to a printer at the client's machine?
I thought of two ways this could be done; one would be to interface
with the printing options of the browser to ensure that margins,
headers, footers are setup properly (I have done this before using
activex and IE, but with mixed results); the other would be to install
some small application at the client machine that would intercept the
print jobs and format them properly (taking the printing function away
from the browser).

Does anyone have any experience or advice? Any links I could read up
on to help me find out how to program this? Another way (easier
hopefully) to accomplish this?
I think one of the easiest ways is to install acrobat reader and
redirect client browser to a generated pdf file.
http://www.reportlab.org/ has support for generating barcodes (and
more) in pdf documents.

-- Leo

Dec 2 '06 #2
Burhan wrote:
Is there an easy way to generate barcodes using Python -- considering
the application will be printing to a printer at the client's machine?
here are some barcode generators for Python:

http://aspn.activestate.com/ASPN/Coo.../Recipe/426069
http://www.cgpp.com/bookland/
http://www.reportlab.org (see the graphics.barcode subpackage)

</F>

Dec 2 '06 #3

Burhan wrote:
Is there an easy way to generate barcodes using Python
Easy way for any application or language to generate barcodes is to
install a barcode font on the client machine, then just generate a
suitable text string for it. This is _very_ easy, if you can get the
font deployed. I usually find myself using Code 39 and printing them
from a HTML document. There are plenty of free code 39 fonts around and
the string mangling to get the barcode structured correctly is just a
trivial prefix / suffix.

Dec 2 '06 #4

Andy Dingley wrote:
Burhan wrote:
Is there an easy way to generate barcodes using Python

Easy way for any application or language to generate barcodes is to
install a barcode font on the client machine, then just generate a
suitable text string for it. This is _very_ easy, if you can get the
font deployed. I usually find myself using Code 39 and printing them
from a HTML document. There are plenty of free code 39 fonts around and
the string mangling to get the barcode structured correctly is just a
trivial prefix / suffix.
I thought about this as an option too, but I do not have control over
the client machines, maybe I'll use this and go with the PDF idea
mentioned above.

Thanks for all the links, I have some reading to do now.

Dec 2 '06 #5
"Andy Dingley" <di*****@codesmiths.comwrites:
Burhan wrote:
Is there an easy way to generate barcodes using Python

Easy way for any application or language to generate barcodes is to
install a barcode font on the client machine, then just generate a
suitable text string for it. This is _very_ easy, if you can get the
font deployed. I usually find myself using Code 39 and printing them
from a HTML document. There are plenty of free code 39 fonts around and
the string mangling to get the barcode structured correctly is just a
trivial prefix / suffix.
Sometimes that's really convenient. Depending on the barcode, this
may not always be easy, though. Certainly there are some
complications, ranging from things like relatively simple check
digits, through complicated encodings (my colleague Robin tells me US
postal bar codes were a particular pain), up to funny-looking 2D "bar"
codes like PDF417, that have lots of complicated rules associated with
them.

The ReportLab open source toolkit barcode support handles this kind of
thing for you -- for the barcodes it supports, anyway.
John

Dec 4 '06 #6
Dennis Lee Bieber <wl*****@ix.netcom.comwrites:
On 04 Dec 2006 12:41:59 +0000, jj*@pobox.com (John J. Lee) declaimed the
following in comp.lang.python:
digits, through complicated encodings (my colleague Robin tells me US
postal bar codes were a particular pain), up to funny-looking 2D "bar"

Really? I seem to recall coding a GW-BASIC/Epson MX-80 compatible
routine to take a zip-code and produce the bar-code for it, on a TRS-80
Mod 4. Wasn't for my use -- a co-worker wanted it (and had the "manual"
of markings allowed on an envelope).
Apparently there's a new US postal barcode, a "four state" barcode.
Presumably you drew the older simpler ones back when you were using
the TRS-80...
John

Dec 5 '06 #7
Dennis Lee Bieber wrote:
On Tue, 05 Dec 2006 18:19:58 GMT, Dennis Lee Bieber
<wl*****@ix.netcom.comdeclaimed the following in comp.lang.python:
> Aye, just the Postnet scheme... The difficult part was working out
the spacing for the dot-matrix printer; the rest was just using the
Zipcode digits as an index into byte-strings of MX-80 codes.

I've recently downloaded the 4-state spec from USPS... That thing is
obscene... At least Postnet could be decoded visually with a simple
chart. 4-state distributes bits all over!
well the code in reportlab/graphics/barcodes that deals with it should be
adaptable if you're interested (only around 300 lines).

I have a feeling that the UK/AU 4state codes aren't as exotic, but not having
actually implemented them it's hard to say.
--
Robin Becker

Dec 6 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Murray Elliot | last post by:
Just wondering if anyone has any ideas on how to solve a particular problem. A client wants to print barcode labels from their (web/php based application). The barcode labels are very small, so I'm...
1
by: David Chapman | last post by:
I need to print barcodes with normal characters on labels from my which has a VB.net front end. The database is a library system, the barcode represents the bookid - the isbn is not used. The book...
6
by: Murray Elliot | last post by:
Just wondering if anyone has any ideas on how to solve a particular problem. A client wants to print barcode labels from their (web/php based application). The barcode labels are very small, so I'm...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
3
by: Michael | last post by:
Hi, I'm trying to print barcodes to the Dymo LabelWriter printer. Put everytime I send a job to the label printer it just outputs an empty label. If I change the default printer back to the...
1
by: kmercer46 | last post by:
My application basically prints barcodes for customers lets say in thousands. And there are operators who prints this barcodes all over the country using this application which is being run over...
1
by: steve | last post by:
Hi All Has anybody had experience with printing text and barcodes to Zebra label printers in VB.net 2005 Regards Steve
0
by: bernardolira | last post by:
Hi all. I made a VB6 program to manage articles using barcodes, and got stuck trying to print barcodes. My printer is a Zebra TLP 2742 (Eltron 2844Z I guess). If I try to print using the EPL...
2
by: zafar | last post by:
Hi there, I need to print barcodes using IDs which are used in my system. I need some help how to print barcodes (any type EAN-13, EAN-8, Code 39 etc etc). If there is any free DLL available for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.