Re: Is there an easier way?
Re: Is there an easier way?
- Subject: Re: Is there an easier way?
- From: Stan Cleveland <email@hidden>
- Date: Thu, 04 Dec 2014 10:04:16 -0800
On Dec 4, 2014, at 7:36 AM, Brian Christmas < email@hidden> wrote: I’m trying to build a list of every paper size available to any given printer, set from a printer list of existing printers.
I’m using the print dialog box from Text Edit, with the code below.
It’s very slow, so I’m wondering if there’s any way of obtaining the list without opening every paper menu?
Any help appreciated.
Hi Brian,
You could use 'do shell script' and parse the text returned by the following two shell commands.
This gives you a listing of "Unix" names for every printer set up on your computer: lpstat -p
This lists all printer options, including paper sizes. Put your "Unix" printer name in place of mine, in red: lpoptions -p Canon_iR_ADV_C9000s_A1_PSV1_0US -p
Below is the PageSize/Media Size portion of the result of the latter command on my system. It's all in one line. The Custom.WIDTHxHEIGHT entry indicates that custom page sizes are supported. The page size that's preceded by an asterisk is the default page size.
PageSize/Media Size: Custom.WIDTHxHEIGHT *Letter Legal Tabloid Executive Statement A3 A4 A5 B5 B4 Monarch Com10 DL C5 ISOB5 SRA3 12x18 13x19 13x19_MAX
HTH, Stan C.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden