Table printing trouble

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I have a Python/MySQL program that produces HTML pages from some items in
our inventory database.  These pages are varying numbers of 1-row, 3-column
tables whose first column is a barcode, the second a small picture of the
items associated with the barcode, and the third column a description of the
items.  We went with a bunch of 1x3 tables per page because that was the
only way we could get the pages to print out without pictures getting
chopped up between the bottom of the first page and the top of the second

Anyway, below is a snippet of code that works fine, except when the text of
the description (column 3) is long enough that it wraps to the second line
of the cell.  When that happens the barcode in the first column gets
mangled.  The first 1 (or 2) characters of the barcode get printed
left-justified on a line and the rest of the characters get printed
left-justified below those.  When the description fits on one line then
everything is fine.  In any browser (Opera, IE, Netscape,
Whatever-Comes-With-OSX), on any OS you can think of (Solaris, Linux, WinXP,
OSX) everything always looks fine.  It is only when the pages are printed
when things go wrong.  All of the pictures are the same width, and it looks
like the browser defaults to setting the column widths of all of the
independent tables the same -- even the ones with the mangled barcodes.

Does anyone know what is happening?  Is there a way to force the first
column with the barcodes to come out as a one line no matter what?  Other
than what is below I don't put any other formatting commands in anything
(like font sizes or anything like that).  I haven't tried commanding the
size of the barcode font -- I suspect that would fix things, but the default
size of it and the Arial text font is just right.  The pages are just for
internal use, so they don't really contain "super official" HTML.  There is
just enough to get them to display on a browser.  The inventory person just
emails the pages to himself from the inventory system program, saves the
attachments in the directory with all of the pictures, and prints the pages
from a browser (which will probably end up being IE).


<table border="0" cellpadding="10">
<td valign="top"><font face="IDAutomationHC39M">!1006240!</font></td>
<td valign="top"><img src="1006240.jpg"></td>
<td valign="top"><font face="Arial">ANTENNA, Q330ANTENNA, Trimble, Q330
clock, Cable,antenna,tube, 25m</font></td>

Site Timeline