NWP

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Rick Graham
Posts: 45
Joined: Sun Jun 07, 2009 10:50 pm

NWP

Post by Rick Graham »

I cannot seem to get my top margin command to work, all the other stuff such as CPI, LPI, FONT, etc seem to work fine.

00010 open #255: "name=win:/default,recl=2028,replace",display,output

00020 print #255: "[LPP(060)]";"[TOP0]";"[10CPI]";;"this is the top line";Newpage

I can change the [TOP0] to [TOP4) and there is no change in the printed page.

Thanks for any suggestions you may have

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

Post by gtisdale »

TOP does not work in WIN: or PREVIEW: only works in PCL DIRECT:

To move the top line in WIN: you need to change the cursor position in your header routine using a "-" minus or plus to move off the default top line.

FNSNAP has a funcction FNPOISITION$ that you can use for this as in

00100 print #255:fnposition$(-1/6,0)

This will move the cursor up 1/6 of an inch in the default 0 position

or

00100 print #255:(FNPOSITION$(.5,0)

This will move the cursor to 1/2 inch below the default top margin in the zero column

FNGeorge
Rick Graham
Posts: 45
Joined: Sun Jun 07, 2009 10:50 pm

Post by Rick Graham »

I have always used my own print routines, some similar to fnsnap, but developed long before fnsnap came into existence.

Can you show me actual code that gets executed?

Thanks for your help

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

Post by gtisdale »

FNSNAP.dll is a BR library.

It is free and can be downloaded from the BRG_PUB directory of the BR FTP web site

To se the code, simply load the library and type

list 'rary fnpos'

that will give you the first line of the function. You can then view and if you want, copy th code into your own program. I recommend using the functions within the library however becasue mmany of them call other library functions within FNSNAP.

I have compiled this library from the old FNSNAP routines (with permission from Gordon) and added many new functions as well. The functions are written to be backward compatable so many will test whether you are running 4.2 or 4.3 or some other and branch to version pecific routines. The theroy is just plug it in and call the functions that you need, a great way to extend the ease of use of BR.

FNGeorge
Rick Graham
Posts: 45
Joined: Sun Jun 07, 2009 10:50 pm

Post by Rick Graham »

PRINTER NWP [TOP0], "\E&l0E"
is in the latest printer.sys file implying that if works, however it obviously doesn't work. Do any margin ESC sequences work?

From an older printer.sys file:
PRINTER NWP [TMARGIN(XX)], "\E&lXXE" ! set top margin
PRINTER NWP [BMARGIN(XX)], "\E&lXXF" ! set bottom margin
PRINTER NWP [LMARGIN(XX)], "\E&lXXL" ! set left margin
PRINTER NWP [RMARGIN(XX)], "\E&lXXM" ! set right margin

It appears that I would have to issue the position sequence at the top of every page, in every report (my test program works with what I pulled from FNSNAP). I have a library function FNSETPRINT$ that opens a file and issues the setup sequences like margins, CPI, LPI, etc.

I was hoping to be able to continue to just set margins and move forward.

Again, many thanks for you help

Rick Graham
Post Reply