Subject Re: printer paper source
From Ken Mayer <>
Date Mon, 10 Aug 2020 06:01:29 -0700
Newsgroups dbase.getting-started

On 8/10/2020 2:30 AM, Mervyn Bick wrote:
> On 2020-08-09 16:27, Ken Mayer wrote:
>>> The one thing I noticed, both with this and with Rick's is that the
>>> last item doesn't show any text, just the number. So with my HP 1020,
>>> it shows:
>>> HP LaserJet 1020
>>>           7 - Auto Select
>>>           4 -
>>> Not quite as useful ...
>> Using the same printer, in the Command Window:
>> inspect( _app.printer )
>> selecting paperSource and clicking the tool button, the dialog shows
>> both "Auto Select" and "Manual Feed", so the information has to be
>> there ....
> We're back to the definition of test data.  The only data with which the
> program will actually work. :-)  I only have the one printer and it only
> has one paper bin so the program returned the correct information.  I
> hadn't thought to try it on PDF995 which has two bin options.
> When all else fails, RTFM! :-)
> I had simply copied Rick Miller's code and made a few changes.  I've now
> done what I should have done in the first place.  I've checked the
> Windows API documentation for DeviceCapabilitiesA().  The paper size
> description can be 64 characters.  The paper bin names are a maximum of
> 24 characters.  Duh!  A simple fix and the program now returns all the
> bin options correctly.
> I've also moved one line of code so that the device name lists for both
> the default printer and a named printer.  It's perhaps a good idea to do
> the same for PaperSize.prg

That works great. Unfortunately I am not sure what the fix is to apply
to PaperSize ...


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial: