🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #87

Re: TabbedTextOut... NEED HELP!

#87
From: Ing. Franz Glaser
Date: Tue, 24 Nov 1998 00:00
36 lines
2845 bytes
Chris Sobotkiewicz schrieb:
> 
>         Hello there. I am trying to fix an old program that was written in
> Borland Pascal 7. Here is a short description of my problem. We are printing
> out reports with Windows fonts etc. to a Device Context. In this report, there
> are some lines that have to be formatted into two columns (they are only one
> string though). The only problem is, the fonts aren't truetype, so the spaces
> between them in the ASCII string aren't lining up. Here is kind of what they
> look like on paper:
> 
> 1. United States        2. Iraq
> 3. India               3. Egypt
> 4. Canada              4. Russia
> 
> Like that. The columns aren't lined up. I can't figure out how to get them to
> line up. I'm using "TabbedTextOut" to print these out. I've tried adding ASCII
> tabs in the string (#7 in Pascal) 
     -----------------#9!!!!
but they just get printed out as boxes on
> the paper. "TabbedTextOut" mentions it can be called more than once to print
> to the same line. I've tried separating the ASCII string into two separate
> strings, and printing them both out separately, but only the first one gets
> printed out. Can anybody offer any suggestions? I'd appreciate it. If
> possible, please respond via email to cgsobotk@students.wisc.edu. Thanks much!

I had a similar problem years ago. I solved it with a somewhat irregular
approach:
First I generated a "template" file using WinWord. This file was saved
as RTF on a simple Textfile. The template had "&1" "&2" "&3" etc. at the
tab positions and these were substituted with a procedure by the actual
data. The result was another .RTF file with the actual data, which could
be loaded by WinWord again and printed.

This is a suggestion only.

Regards, Franz Glaser
Technical Details
Message-ID: <365B1873.3DB2C564@eunet.at>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <73f3r1$1a0e$1@news.doit.wisc.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10261c,dc1adf7ae9861d99
X-Google-Attributes: gid10261c,public
X-Google-Thread: 108ebd,dc1adf7ae9861d99
X-Google-Attributes: gid108ebd,public
X-Google-Thread: 108ebe,dc1adf7ae9861d99
X-Google-Attributes: gid108ebe,public
X-Google-Thread: 111659,dc1adf7ae9861d99
X-Google-Attributes: gid111659,public
From: "Ing. Franz Glaser" <meg-glaser@eunet.at>
Subject: Re: TabbedTextOut... NEED HELP!
Date: 1998/11/24
Message-ID: <365B1873.3DB2C564@eunet.at>
X-Deja-AN: 415277633
Content-Transfer-Encoding: 7bit
References: <73f3r1$1a0e$1@news.doit.wisc.edu>
To: Chris Sobotkiewicz <cgsobotk@students.wisc.edu>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@Austria.EU.net
X-Trace: fleetstreet.Austria.EU.net 911939716 10894 193.154.148.248 (24 Nov 1998 20:35:16 GMT)
Organization: MEG Glaser
Mime-Version: 1.0
NNTP-Posting-Date: 24 Nov 1998 20:35:16 GMT
Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,borland.public.cpp.owl,borland.public.turbopascal