NWP - White text on black background

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

NWP - White text on black background

Post by Susan Smith »

Hi all,

Can you print white text on a black background natively in NWP?

We talked about this a long time ago, and the answer was no at that time. I thought that maybe things had changed OR perhaps FNSNAP's NWP functions FNPRINTBOX$ or FNDRAWBOX$ could do it, but I couldn't figure it out.

You know how some invoice forms have white column headings that are populated over a black horizontal band (box) that extends across the form? A picture is attached. That's what I need to do and it has to be in NWP with no PCL.

Is there another way that someone can point me toward? Thanks!

-- Susan
Attachments
whiteonblack.jpg
whiteonblack.jpg (13.01 KiB) Viewed 13720 times
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

NWP printing as implemented by BR is very compatable with FNPRINTBOX. There are a few exceptions relating to centering and rotating text. But the rest is compatable.

In the TESTS directory of the thumb drive under George is a program WHITETEXT.br which I will insert here that does exactly what you are asking.

00010 LIBRARY ENV$("PD")&"vol002\fnsnap.dll": FNPRINTBOX
00020 DIM WHITE$*30,BLACK$*30,TEXT$*50
00030 OPEN #255: "name=PREVIEW:/select,recl=2000",DISPLAY,OUTPUT
00040 EXECUTE "proc *:vol002\tt"
00050 LET V=2: LET H=2: LET BV=0.5: LET BH=1: LET SHADE=100: LET TV=.25 : LET TH=.3
00060 LET FNPRINTBOX(255,V,H,BV,BH,SHADE,TV,TH,"[WHITE]Text"&BLACK$,10,"[BOLD][FONT ARIAL]")
00065 LET FNPRINTBOX(255,V+2,H,BV,BH,10,TV,TH,"[WHITE]Text",10,"[FONT ARIAL]")
00070 ! CLOSE #255:
00080 STOP

The contents of TT that is "proced" in is

PROC NOECHO
let DATFMT$="MM-DD-CCYY":let MAXSROWS=22:let SSAV=103:let WINDEV=OWINDEV=69:let MGA$="24,2,c 78,"
let PFK=-1:let PGUP=90:let PGDN=91:let newtab=95:let REDX=CLOSE=93:let ESC=99:let ESC$=CHR$(27)
let UP=102:let LEFT=103:let DN=104:let UPFLD=105:let DNFLD=106:let FOFLOW=107
let RIGHT=109:let HOME=112:let END=113:let FLDPLUS=114:let FLDMINUS=115
let CLICK=201:let DBLCLICK=202:let RTCLICK=100:let RTDBLCLICK=100
let LF$=CHR$(10):let CR$=CHR$(13):let CRLF$=CHR$(13)&CHR$(10):let ff$=chr$(12)
let BOLD$=ESC$&"(s3B":let CONDENSE$=ESC$&"(s4S"
let FALSE=0:let TRUE=~FALSE:let YES=TRUE:let NO=FALSE
let Yn$="Yn":let Ny$="yN":let ync$="Ync":let nyc$="yNc":let cyn$="ynC"
let white$=chr$(27)&"*v1o1T":let black$=chr$(27)&"*v0o0T":let grey$=chr$(27)&"*1v2T"
let aright$=chr$(27)&"right_justify" : let aleft$=chr$(27)&"left_justify" : let acenter$=chr$(27)&"center"
let topleft$=chr$(27)&"&a0v0H"
config attribute [HEADER]N/#000000:#CCCCCC,font=Arial:small:bold" ! medium black letters on gray background
config attribute [SELECTED]N/#0000FF:#FFFFFF,font=Arial:medium:slant" ! medium blue letters on white background

Use this to get the values of white$ and black$

FNGeorge
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

Also, from PRINTER.SYS [WHITE] and [BLACK] are
PRINTER NWP [BLACK], "\Ecolor='#000000'"
PRINTER NWP [WHITE], "\Ecolor='#FFFFFF'"

FNGeorge
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

Yet another way of doing this would be the following program:

00100 LIBRARY ENV$("PD")&"vol002\fnsnap.dll": FNPRINTBOX$,FNPRINTNWP$
00110 OPEN #10: "name=preview:/select,recl=2000",DISPLAY,OUTPUT
00120 EXECUTE "proc *:vol002\tt"
00125 PRINT #10: "[BOXVERTICALS]"
00130 LET V=1 : LET H=0: LET BV=.25: LET BH=8: LET SHADE=100
00140 PRINT #10: FNPRINTBOX$(V,H,BV,BH,SHADE)
00150 PRINT #10: FNPRINTNWP$(V+.18,6,"R","[WHITE]Check","[FONT ARIAL][BOLD]")&FNPRINTNWP$(V+.18,6,"R","Date")
00160 STOP


FNGeorge
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

I'll try that too. Thanks George.

-- Susan
Post Reply