Compressed Text
Oran Shapitka
oran@intertechsystems.com
Wed, 30 Aug 2000 14:09:10 -0600
Whenever I need to control the printer within quiz I use the following USE
file to add all the escape codes that I have ever needed. This solution has
been tested on the HP e3000, HP-UX and on the old PC PowerHouse platforms.
;********************************************************************
; *
; Name: CNTRLCD.QZS *
; *
; Author: Intertech Business Systems, Inc. *
; www.intertechsystems.com *
; *
; Date: 94-JAN-04 *
; *
; Purpose: Standard control codes to control HP Laserjet printers. *
; *
;********************************************************************
; *
; Maintenance History *
; *
; Date Description *
; --------- ------------------------------------------------------ *
; 93-JAN-04 Implemented. - Intertech *
; *
;********************************************************************
;Add the items you need to your page heading or initial heading.
;'Resethp' must be used as the first item in the list.
;Always reset the printer at the end of the report by putting
;the variables 'resethp normal' in a final footing.
(24/68) Continue?
;--------------------------------------------------------------
;warning: use a line or page skip after escape sequences to
; prevent interference from data in report
;--------------------------------------------------------------
define d-cr-bl-int int size 2 = 3341 ; ablank line with a cr
; will print with set noblanks
define d-esc-int int size 2 = 27
define d-cr-int int size 2 = 13
@if hpmpexl or unix
define d-escape character * 01 = character(d-esc-int)[2:1]
define d-cr character * 01 = character(d-cr-int)[2:1]
define d-crbl character * 01 = character(d-cr-bl-int)[2:1]
@elseif pc
define d-escape character * 01 = character(d-esc-int)
define d-cr character * 01 = character(d-cr-int)
@endif
define d-portrait character * 05 = d-escape + "&l0O"
define d-page-portrait character * 05 = d-escape + "&l0O"
define d-landscape character * 05 = d-escape + "&l1O"
(47/68) Continue?
define d-page-landscape character * 05 = d-escape + "&l1O"
define d-line-compressed character * 05 = d-escape + "&k2S"
define d-line-normal character * 05 = d-escape + "&k0S"
define d-cpi-16 character * 09 = d-escape + "(s16.66H"
define d-cpi-10 character * 09 = d-escape + "(s10.00H"
define d-lpi-6 character * 05 = d-escape + "&l6D"
define d-lpi-8 character * 05 = d-escape + "&l8D"
define d-legal character * 05 = d-escape + "&l3A"
define d-letter character * 05 = d-escape + "&l2A"
define d-reset character * 04 = d-escape + "&k0S"
define d-reset-ff character * 02 = d-escape + "E" ; page advance
define d-simplex character * 05 = d-escape + "&l0S"
define d-duplex-legal character * 05 = d-escape + "&l1S"
define d-duplex-letter character * 05 = d-escape + "&l2S"
define d-line-feed character * 05 = d-escape + "&k0G"
define d-roman-8 character * 05 = d-escape + "(8U"
define d-printer-bypass character * 70 = d-escape + "&oF" + &
" set printer-bypass yes" + d-cr
define d-disable-translation character * 70 = d-escape + "&oF" + &
" set disable-printer-translation yes" + d-cr
Oran Shapitka, ISP
Intertech Business Systems, Inc.
1564, 10303 Jasper Ave Email: oran@intertechsystems.com
Edmonton, AB T5J 3N6 Canada Voice: (780) 413-0400 Fax: (780) 413-0398
<http://www.intertechsystems.com/>
-----Original Message-----
From: owner-powerh-l@sphere.swau.edu
[mailto:owner-powerh-l@sphere.swau.edu]On Behalf Of Grace, Jim
Sent: Wednesday, August 30, 2000 12:33 PM
To: 'powerh-l@lists.swau.edu'
Subject: Compressed Text
I am trying to compress the text in a quiz report to print out on an HP
laser jet 8000N. I am trouble getting the on and off codes to work. I have
an example from Cognos on how to do it. Has anyone been successful with
this.
Please let me know.
Thanks
The example below should cause a compressed font to be used by th printer.
Quiz
>DEF escn int*1 = 27;
>def esc char*1 = char(escn)[2:1]; this will send the Esc sequence to the
printer
>def COMPRESSION char*2 = esc + "<on code>"; see printer manual for this
code
>def COMPRESSOFF char*2 = esc + "<off code>"; see printer manual for this
code
>REPORT COMPRESSION "Compressed" COMPRESSOFF "NOT Compressed"
If this works, the string,"compressed", should appear in small fonts.
If it does not then the escape sequence code selected is wrong for the
printer. Each printer has its own set of printer control code sequences.
Refer to your printer manual or call the manufacturer/vendor.
If it is necessary to have the page headings compressed, add the COMPRESSION
item to the beginning of the page heading, or to the initial page heading.
Turn off the compression setting sent to the printer, by reporting the
COMPRESSOFF item in the final footing of the report.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.