If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
05-02-02, 08:14
Junior Member
Join Date: Apr 2002
Posts: 5
bold text in informix 5.1 4gl
hi..
how can i make a bold text in informix 5.1 ? do i can?
thanx..beres..
12-28-10, 03:37
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hi,
A colleague asked the above question and I earlier tried to find out on the same.
What inhibits achieving having bold test in informix ?
Is it the platform one is operating on or a combination of the platform, the application and indeed the printer ?
We have informix-4gl 7.32 UC3 and CentoS Linux 4.8. I have tried all these but they don't seem to work:
---LET BoldOn = ASCII "\027", ASCII "\(s3B"
---LET BoldOff = ASCII "\027", ASCII "\(s0B"
---LET BoldOn = ASCII 27,"(s3B (b)"
---LET BoldOff = ASCII 27,"(s0B (b)"
---LET BoldOn = ASCII 27, ASCII 040, ASCII 115, ASCII 051, ASCII 066, ASCII (98)
---LET BoldOff = ASCII 27, ASCII 040, ASCII 115, ASCII 048, ASCII 066, ASCII (98)
----LET BoldOn = ASCII 27, ASCII 040, ASCII 115, ASCII 051, ASCII 066
----LET BoldOff = ASCII 27, ASCII 040, ASCII 115, ASCII 048, ASCII 066
LET BoldOn = ASCII 27,ASCII 040,ASCII 115,ASCII 051,ASCII 066
LET BoldOff = ASCII 27,ASCII 040,ASCII 115,ASCII 048,ASCII 066
Can anyone help I one should troubleshoot in achieving the desired results.
Thanks for your cooperation.
Felix Mwango Mutale
fmutale02@yahoo.com
12-28-10, 12:19
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
The assumption is that you are trying to print to a HP Laser printer using PCL5 escape sequences.
First:
Create a text file using vi, or whatever to print BOLD_ON Hello World BOLD_OFF Bye.
Send this file to the printer with the lp command.
Does it print the way you want it to?
Next create the report file in Informix, and instead of sending the file to the printer, save it and compare it to the hello world file.
Adjust the Informix program till you get the desired output.
Lastly send the Informix output to the printer.
12-29-10, 03:29
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hello,
I tried to enter the following:
BOLD_ON Hello World BOLD_OFF
and this what I got:
BOLD_ON Hello World BOLD_OFF
I have this simple program:
DATABASE "/u/srsdev/studtest"
define ds_on,ds_off,dw_on,dw_off,cm_on,cm_off char(6),
BOLD_ON CHAR(10),
BOLD_OFF CHAR(10)
main
---let ds_on = ascii(27), ascii(71)
---let ds_off = ascii(27), ascii(72)
---- LET ds_on = ASCII 27, ASCII 040, ASCII 115, ASCII 052, ASCII 066
---- LET ds_off = ASCII 27, ASCII 040, ASCII 115, ASCII 048, ASCII 066
LET BOLD_ON = ASCII(27),"(s3B"
LET BOLD_OFF = ASCII(27),"(s0B"
let dw_on = ascii(27), ascii(14)
let dw_off = ascii(27), ascii(20)
let cm_on = ascii(27), ascii(15)
let cm_off = ascii(27), ascii(18)
start report font to "test.txt"
output to report font()
finish report font
end main
report font()
output
left margin 0
format
on every row
---print ds_on, "THIS IS DOUBLE STRIKE", ds_off
--print dw_on, "THIS IS DOUBLE WIDTH ", dw_off
--print cm_on, "THIS IS COMPRESSED ", cm_off
PRINT BOLD_ON, "Hello World", BOLD_OFF
PRINT BOLD_ON, "testbold.4gl testprint", BOLD_OFF
end report
And this is what I got:
^[(s3B Hello World^[(s0B
^[(s3B testbold.4gl testprint^[(s0B
Somehow I feel the commands, either due to spooler or something else, are not being obeyed. Is there something else I can possibly try ?
Thanks and regards.
Felix Mwango Mutale
fmutale02@yahoo.com
12-29-10, 07:05
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
What is the make and model of the printer?
12-29-10, 08:13
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hello Kitaman,
We have HP LaserJet P3005 and HP LaserJet P3015 Printers Installed.
We could have other higher versions but, these are the common ones.
Thanks and regards.
Felix
12-29-10, 13:29
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
Are you using CUPS or SYSV printing?
Did you create the file "test.txt", and can you send it directly to the printer?
Jack
12-30-10, 03:36
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hi Jack,
Thanks for the response. We are using CUPS and I created a table with the following properties:
Column name Type Nulls
boldon char(10) yes
testname char(30) yes
boldoff char(10) yes
And in my program I had these statements:
insert into test
values (BOLD_ON,"Hello World",BOLD_OFF )
PRINT BOLD_ON, "Hello World", BOLD_OFF
PRINT BOLD_ON, "testbold.4gl testprint", BOLD_OFF
The output from the file was:
boldon testname boldoff
3B Hello World 0B
I trust this can give you some clue of what is happening.
Thanks and I look forward to your assistance.
Felix
12-30-10, 07:39
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
Felix,
I am out of the office today.
12-30-10, 12:05
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
The attached file will print the word "BOLD" in bold, and the word "Regular" in the printer default font. My print spooler also adds "<esc>&k2G" to the beginning of the file to turn on conversion of line feed to carriage return/line feed.
If you print this file using the lp command, does it print correctly?
If you create a file from your Informix program, does it create the same sequence of characters?
Attached Files
t.txt (27 Bytes, 55 views)
01-05-11, 09:21
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hi Jack,
Thanks for the reply. Sorry I didn't see the msg in time.
From the program code I sent you, I ftped my test.txt file and opened it in Notepad and this is what it gave me:
(s3B Hello World(s0B
(s3B testbold.4gl testprint(s0B
The output from informix as:
^[(s3B Hello World^[(s0B
^[(s3B testbold.4gl testprint^[(s0B
I wonder if this has to do with the spooler which we have.
Thanks again
Felix
01-05-11, 10:57
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
Try sending the file to the printer directly.
Use "netcat" for a network connected printer, or "cat" for a directly connected printer.
If this works, then you are left with the problem of how to either bypass the spooler, or create a new print destination that does not modify the incoming print file.
01-06-11, 07:12
Registered User
Join Date: Sep 2006
Posts: 17
how can i make a bold text in informix 5.1 4gl
Hi Jack,
How are are you ? Thanks again for the reply. I am not a network person, Could you please assist me with parameters on how I can use and implement netcat so that I can use it in my informix-4gl print program or on command line.
Thanks
01-09-11, 10:15
Papabi's friend
Join Date: Sep 2009
Location: Ontario
Posts: 627
For network attached printer
Code:
cat reportfile |netcat -h hostname -p port_number
Where hostname is ip address and port_number is tcp port number.
For locally attached printer
Code:
cat reportfile >/dev/devicename
Where devicename is the actual name of the device (lp, lp1, ttys1 etc)
In both instances, reportfile has to contain all the required escape sequences, beginning with at least:
<esc>E #reset
<esc>&k2G #convert lf to crlf
and should end with another reset ( to be nice to the next person to use the printer.)
If your system does not have netcat, you can download it from here
The GNU Netcat -- Official homepage
01-25-11, 01:42
Registered User
Join Date: Jan 2011
Posts: 1
NFkBsculsom
Quote:
Originally Posted by
Felix M Mutale
Hi,
A colleague asked the above question and I earlier tried to find out on the same.
What inhibits achieving having bold test in informix ?
Is it the platform one is operating on or a combination of the platform, the application and indeed the printer
free online movies ?
We have informix-4gl 7.32 UC3 and CentoS Linux 4.8. I have tried all these but they don't seem to work:
---LET BoldOn = ASCII "\027", ASCII "\(s3B"
---LET BoldOff = ASCII "\027", ASCII "\(s0B"
---LET BoldOn = ASCII 27,"(s3B (b)"
---LET BoldOff = ASCII 27,"(s0B (b)"
---LET BoldOn = ASCII 27, ASCII 040, ASCII 115, ASCII 051, ASCII 066, ASCII (98)
---LET BoldOff = ASCII 27, ASCII 040, ASCII 115, ASCII 048, ASCII 066, ASCII (98)
----LET BoldOn = ASCII 27, ASCII 040, ASCII 115, ASCII 051, ASCII 066
----LET BoldOff = ASCII 27, ASCII 040, ASCII 115, ASCII 048, ASCII 066
LET BoldOn = ASCII 27,ASCII 040,ASCII 115,ASCII 051,ASCII 066
LET BoldOff = ASCII 27,ASCII 040,ASCII 115,ASCII 048,ASCII 066
Can anyone help I one should troubleshoot in achieving the desired results.
Thanks for your cooperation.
Felix Mwango Mutale
fmutale02@yahoo.com
Wonderful! thanks for the info that you guys have been discussing. Awesome!!!!
Thread Tools
Search this Thread
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off