LB Booster
« printing to printer »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 05:03am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: printing to printer  (Read 1928 times)
hammerjit
New Member
Image


member is offline

Avatar




PM


Posts: 26
xx Re: printing to printer
« Reply #19 on: Jun 24th, 2015, 09:09am »

Richard....your suggestion is good, please do consider if there is future enhancement. smiley

btw...another question on this printing....if the output goes more than 2 pages, is there a way for us to put a header for each page? and also page number?
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: printing to printer
« Reply #20 on: Jun 24th, 2015, 10:50am »

on Jun 24th, 2015, 09:09am, hammerjit wrote:
if the output goes more than 2 pages, is there a way for us to put a header for each page? and also page number?

I think I have a program which does that, but unfortunately it's on my PC at home and I don't have access to it where I am. Remind me in a couple of weeks.

Richard.
User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Reminder to Richard...
« Reply #21 on: Jul 11th, 2015, 10:35pm »

>if the output goes more than 2 pages, is there a way for us to put a header for each page? and also page number?

I think I have a program which does that, but unfortunately it's on my PC at home and I don't have access to it where I am. Remind me in a couple of weeks.

Richard.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: printing to printer
« Reply #22 on: Jul 12th, 2015, 10:25am »

on Jun 24th, 2015, 10:50am, Richard Russell wrote:
I think I have a program which does that

Here is the program. It's intended as a proof-of-principle, in practice you would probably want to put the printing code in a SUB so it can be called from multiple places:

Code:
  PrinterName$ = "DoPDF v7"
  pv = 99999
  page = 1
  for i = 1 to 200
    oldpv = pv
    !pv = @vdu%!-8
    if pv < oldpv then
      lprint "THIS IS THE HEADER FOR PAGE "; page
      lprint
      page = page + 1
    end if
    lprint "This is line "; i; " of text sent to the printer"
  next
  dump 

Note that this can't work if you are relying on the 'word wrap' capability of LPRINT (unless you output each word individually), because if it wraps from one page to the next it's impossible to print the header part way through the output string.

Richard.
« Last Edit: Jul 12th, 2015, 10:28am by Richard Russell » User IP Logged

SarmedNafi
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 93
xx Re: printing to printer
« Reply #23 on: Jul 12th, 2015, 12:35pm »

Thank you Richard,
It is a kind of you. Thank you very much.
User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »


This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls