473,883 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2388

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.barcod e 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*****@codesm iths.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.net com.comwrites:
On 04 Dec 2006 12:41:59 +0000, jj*@pobox.com (John J. Lee) declaimed the
following in comp.lang.pytho n:
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.net com.comdeclaime d the following in comp.lang.pytho n:
> 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
4347
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 guessing that doing a screendump via a standard inkjet isn't going to work (i.e. might need somehow to print to a barcode printer!) Any ideas where to start? Thanks in advance.
1
2687
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 name needs to be printed under the barcode. The printing can be done on sheet labels. Can anyone advise or point me in the direction of a suitable module please?
6
3960
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 guessing that doing a screendump via a standard inkjet isn't going to work (i.e. might need somehow to print to a barcode printer!) Any ideas where to start? Thanks in advance.
3
6325
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 computer has drivers installed for this printer, and this printer is shared for the network. Question 1:
3
15048
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 standard printer(HP LaserJet), it prints fine. Has anyone worked with Label printers like this. Here is the code I'm using: Private Sub cmdPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrint.Click try Dim BarCode...
1
1888
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 citrix. I am using EPSON LQ2180 printer (DotMatrix) with custom paper size Now the issue is it skips one paper for everybarcode i print meaning if I print 100 barcodes and i have 100 blank papers coming with it. Ideas are highly appreciated...
1
6971
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
1885
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 syntax, the results are none or the code itself (not the barcodes). I tried changing the printer driver (so it would print as Generic/Text, this I read somewhere) but it prints nothing. I run out of ideas. I need help ASAP!!! Thanks in advance...
2
1851
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 printing barcodes with high quality in .Net so plz let me know about it. Urgent reply will be appreciated. Thanks.
0
9942
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7129
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5797
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4220
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3233
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.