[boulder.pm] Font width/length for CGI scripts using CSS

Scott Longmore longmore at fsl.noaa.gov
Sat Dec 30 12:45:44 CST 2000


Jonathan Conway wrote:

> On Fri, 29 Dec 2000, Rob Nagler wrote:
>
> > > I essentially need to be able to read in a text file...and throw the
> > > text into a series of fixed sized tables. By calculating the length
> > > in pixels of the text knowing the width of each charcters for a
> > > particular font, I can determine when to insert carriage returns
> > > or html line breaks and to carry over into the next table column.
> >
> > If you find out, let us know.  I don't believe this information is
> > available.   Indeed, you have no guarantee the browser will render
> > in a particular font.
>
> If you absolutely have to do this you're not going to be able to do it in
> HTML. As Rob points out there are no guarantees on the rendering end and
> if you're using lynx, w3m, or the emacs w3 mode in a text term they'll
> probably see only the terminal font.

Not really worried about lynx w3m or emacs...as our customers will
be accessing these documents via netscape or ie through T1 connections.

> What you're going to have to do is
> put everything in images, use Java to render the text, or produce a PDF of
> the text with the proper format. The first two are awful in terms of
> bandwidth and maintenance (as well as compatibility). The PDF options
> isn't particularly great on either front but may be your best bet (if only
> because then someone can use pdftotext or pdftohtml to extract the text).

This is the way its currently being done now...were using framemaker manually

to generate pdf files and postscript files. the postscript files are then
converted
to png files which are then put on the web page...ugly huh...the pdf file is
a linked
into the html files so customers can download and print it out.

> If you can tell us why you need to do this someone may be able to come up
> with a better solution for your particular problem domain.

Essentially...Im trying to automate the generation of a newsletter that
can go on the web in html and create a downloadable pdf file by having
the newsletter writer, scientist..not computer inclined <grin>, write
a text file...that I can slurp in and dump into a nicely standardized and
formated html file...need to be able to use columns..as he is use to seeing
journal format...also will need to be able to embed images here and there.
Were trying to get rid of framemaker and all the different image/file
conversions....esentilly smooth out the process.

Maybe it would be better to dump the text and images to a semi large
image file im thinking 800 h x 600 w ....problem with this is then generating

the pdf file.....

What do ya think....

Scott





More information about the Boulder-pm mailing list