[futurebasic] Re: Print Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1998 : Group Archive : Group : All Groups

From: JoeAtTIME@...
Date: Mon, 28 Sep 1998 13:22:53 EDT
Well I did an end run arround the problem I was having with printing. Instead
of sending all the print and drawing commands to the printer, I draw into a
gWorld and copybits to the printer instead. I was not able to figure out why I
could not get printing directly to the printer to work.

I am still having trouble gitting the number of copies to print.

mikonic wrote:

>I was talking to Chris Stazny yesterday about Printing stuff. Let me see if
>I have it right:
>
>1. Alway send all pages in your document off to the Print Manager. 
>
>The Print Manager is smart enough to extract the correct number of copies of
>your complete document with the correct page range as read from the standard
>print dialog.
>
>2. build on the following sequece
>
>DEF LPRINT
>
>    LONG IF PRCANCEL = 0
>
>        ROUTE _toPrinter            'route drawing to Chooser printer
>        FN PrintFirstPage
>        ROUTE _toScreen             'route drawing to Screen
>        CLEAR LPRINT                'eject first page
>
>        ROUTE _toPrinter
>        FN PrintNthPage
>        ROUTE _toScreen             'route drawing to Screen
>        CLEAR LPRINT                'eject nth page
>
>        ROUTE _toPrinter
>        FN PrintLastPage
>        ROUTE _toScreen
>        CLOSE LPRINT                'done printing, eject last page, close
>the printer

And Rick Brown wrote:

>In my experience, this is not necessary.  I find that this works just as
>well:
>
>    LONG IF PRCANCEL = 0
>
>        ROUTE _toPrinter            'route drawing to Chooser printer
>        FN PrintFirstPage
>        CLEAR LPRINT                'eject first page
>
>        FN PrintNthPage
>        CLEAR LPRINT                'eject nth page
>
>        FN PrintLastPage
>        CLOSE LPRINT                'done printing, eject last page;
>        ROUTE _toScreen
>

I am puzzled by the above examples. Do you mean write a seperate FN for each
page to print? 

What I have is a big image that I want to print. It is much larger that one
sheet of paper so I want to  print out sheets that tile together.

I have been trying to create the print routine based on this one from the FB
handbook examples:

_firstPage  = 62                                  'PRHANDLE field offsets
_lastPage   = 64
_copies     = 66
LOCAL FN printingRoutine                          'this routine handles
printing
  '
  DEF LPRINT                                      'print... dialog
  LONG IF PRCANCEL = _false                       'printing cancelled?
    WINDOW #2, "", (50,50)-(370,100),_dialogShadow
    TEXT _sysFont, 12
    msg$ = "To abort printing, hold in the -period keys..."
    EDIT FIELD #1,msg$, (10,10)-(310,40),_statNoFramed
    gPrtAbort% = _false                           'reset abort flag
    
    fromPage% ={[PRHANDLE]+_firstPage}            'get first page to print
    toPage%   ={[PRHANDLE]+_lastPage}             'get last page to print
    copies%   ={[PRHANDLE]+_copies}               'get how many copies to
print
    
    LONG IF (toPage% <= 0) OR (toPage% => _iPrPgMax)'change 1 to actual pages
      toPage% = _iPrPgFst
    END IF
    
    ROUTE _toPrinter                              'set output to printer
    COORDINATE WINDOW                             '1/72" coordinates for page
    pageNum% = 0                                  'init variable
    DO                                            'print until the last page
      INC(pageNum%)                               'increment page count
      FN checkAbortKeys                           'see if cmd-period pressed
      LONG IF gPrtAbort% = _false                 'only print if abort is
false
        LONG IF pageNum% => fromPage%             'check if printing in range
          FN printPage(pageNum%,copies%)          'call print routine
          CLEAR LPRINT                            'finish page, go to next
page
        END IF
      END IF
    UNTIL pageNum% => toPage% OR gPrtAbort% = _true
    ROUTE _toScreen                               'set ouput pack to screen
    CLOSE LPRINT                                  'close the printer driver
    WINDOW CLOSE #2                               'close abort window
    EDIT FIELD #2, "Print routine done!", (20,200)-(300,232),_statFramed
  END IF
  '
END FN

The line that gets the number of copies: "copies%   ={[PRHANDLE]+_copies}"
always seems to return 1 no matter how many copies are entered in the print
dialogue box. Can this FN be replaced by the Print Manager examples above some
how? 


>6) I achieved a dramatic increase in page construction productivity when the
>Adobe Acrobat Printer Driver was installed in the Chooser when I installed
>the Adobe Acrobat Distiller- no more wasted paper and waiting for my very
>slow printer to output. I estimated that my productivity in this tedious
>process increased by a factor of at least ten. If you have to design a lot
>of printer output, I highly recommend the purchase of Distiller just for
>Chooser acces to the Adobe Acrobat Printer Driver.

Thanks for this tip. I will try it.


Thanks for any help,
-Joe Lertola