Subject Re: printer paper source
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Mon, 10 Aug 2020 10:35:52 -0700
Newsgroups dbase.getting-started

On 8/10/2020 8:21 AM, Mervyn Bick wrote:
> On 2020-08-10 15:01, Ken Mayer wrote:
>
>>
>> That works great. Unfortunately I am not sure what the fix is to apply
>> to PaperSize ...
>
> Do you mean that paperSize.prg shows the last papersize number but not
> the description?
>
> On my computer the last papersize number and description (256 -
> Custom... and 32767 - PostScript Custom Page Size) is shown for both the
> Canon printer and PDF995.
>
> PaperSize.prg only prints the device name if the program is executed
> without a parameter.  For PaperBin.prg I moved the print statement out
> of the if...endif so that it always prints.  This is the change I
> suggested for paperize.prg.
>
>     if not type("argVector(1)") == "C"
>         cDevice  := getPrinterDefault()
> //       ? cDevice  // moved out of if...endif  MB 2020-08-10
>     endif
>      ? cDevice

Okay, well ... when I run papersize this is the output:

HP LaserJet 1020
          1 - Letter
          5 - Legal
          7 - Executive
          9 - A4
         11 - A5
         20 - Envelope #10
         27 - Envelope DL
         28 - Envelope C5
         34 - Envelope B5
         37 - Envelope Monarch
         13 - B5 (JIS)
        259 - B5 (ISO)
        262 - A6
        261 - Double Post Card
        260 - Post Card
        258 - 8.5x13
        257 - 16K
        256 -

Note that 256 doesn't have anything after it.

Ken


--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm