On 26 okt 2009, at 02:09, Pascal Robert wrote:

> We have an app that use CUPS to print labels. The framework use JIPSI :
> 
> http://www.lohndirekt.de/software/jipsi_quickstart_drucksoftware.html
> 
> Disclaimer : I didn't setup the CUPS server and didn't work on the app, I 
> just know that we have an app that use it :-) You should look at the IPP 
> stuff in LEWOStuff from Andrew.
> 
>> No, that would be crazy, even for me (^_^)
>> 
>> I was just wondering if it were possible to set up a client Mac to  
>> print automatically to a specific printer based on characteristics of 
>> 
>> the print job.  So, let's say I have a color inkjet printer, a black 
>> 
>> and white laser printer, and a star receipt printer.  If I print out a
>> 
>> picture, I want the picture to go to the color printer.  If I'm  
>> printing a black and white, text only document, then I want that to go
>> 
>> to the laser, and if I have a print job that is 7cm wide, it should go
>> 
>> to the receipt printer.  Automatically... or at the very least, pre- 
>> selected in the print dialog so that all I have to do is hit the enter
>> 
>> key to print.  It seems the only options I really have is to select a 
>> 
>> specific printer, or default to the last printer used. I'm wondering 

You could do it via the command Line: 

see: http://www.cups.org/documentation.php/options.html

"
The actual options supported are defined in the printer's PPD file in the 
PageSize, InputSlot, and MediaType options. You can list them using 
thelpoptions(1) command:

lpoptions -p printer -l
"

so:
lpstat -a | awk  '{print "echo; echo "$1"; echo; lpoptions -p "$1" -l"}'| sh

would give you a rude way to find out which printer support which options. 

Here is some of the output I messed with to find out the supported pageSizes.

sh-3.2# lpstat -a | awk  '{print "echo Printer "$1"; lpoptions -p "$1" -l"}'| 
sh | grep -E "Printer|PageSize" 
Printer BOCA_SYSTEMS_44_200
PageSize/Media Size: w144h144 w144h234 w144h288 w153h234 w153h288 w162h234 
w162h288 w180h144 w180h234 w180h288 w198h144 w216h144 w216h234 w216h288 
w243h153 w252h144 w288h144 w288h180 w288h234 w288h288 w306h153 w324h144 
w360h144 w360h153 w360h180 w360h234 w360h288 w396h144 w396h153 w396h180 
w396h198 w396h234 w396h288 w405h144 w432h144 w432h153 w432h180 w432h198 
w432h234 w432h288 w441h184 w459h96 w468h144 w468h234 w468h288 w504h144 w504h234 
w504h288 w531h234 w531h288 w576h72 w576h96 w576h144 *w576h234 w576h288 w648h234 
w648h288 w720h234 w720h288 w792h72 w792h96 w792h234 w792h288 w864h234 w864h288 
w936h234 w1152h72 w1152h96 w1152h144 w1152h153 w1152h180 w1152h184 w1152h198 
w1152h234 w1152h288 Letter Legal A4 Custom
Printer Canon_iP3000___Soundmini
PageSize/Media Size: iso-a5 iso-a4 jis-b5 *na-letter na-legal 
na-number-10-envelope iso-designated-long-envelope DMSIZE_4X6 DMSIZE_5X7 
DMSIZE_DISCTRAY3 DMSIZE_CREDITCARD DMSIZE_MINUS_A4 DMSIZE_MINUS_LETTER 
DMSIZE_MINUS_4X6 DMSIZE_MINUS_5X7 DMSIZE_MINUS_CREDITCARD Custom
Printer DYMO_LabelWriter_320
PageSize/Media Size: *30256_Shipping 30252_Address 30253_Address_(2_up) 
30258_Diskette 30277_File_Folder_(2_up) 30299_Jewelry_Label_(2_up) 
30320_Address 30321_Large_Address 30323_Shipping 30324_Diskette 
30325_Video_Spine 30326_Video_Top 30327_File_Folder 30330_Return_Address 
30332_1_in_x_1_in 30333_1_2_in_x_1_in_(2_up) 30334_2-1_4_in_x_1-1_4_in 
30335_1_2_in_x_1_2_in_(4_up) 30336_1_in_x_2-1_8_in 30337_Audio_Cassette 
30339_8mm_Video_(2_up) 30345_3_4_in_x_2-1_2_in 30346_1_2_in_x_1-7_8_in 
30347_1_in_x_1-1_2_in 30348_9_10_in_x_1-1_4_in 30364_Name_Badge_Label 
30365_Name_Badge_Card 30370_Zip_Disk 30373_Price_Tag_Label 
30374_Appointment_Card 30376_Hanging_File_Insert 30383_PC_Postage_3-Part 
30384_PC_Postage_2-Part 30387_PC_Postage_EPS 99010_Standard_Address 
99012_Large_Address 99014_Name_Badge_Label 99014_Shipping 99015_Diskette 
99016_Video_Spine 99016_Video_Top 99017_Suspension_File 99018_Small_Lever_Arch 
99019_Large_Lever_Arch 11351_Jewelry_Label 11352_Return_Address_Int 
11353_Multi-Purpose 11354_Multi-Purpose 11355_Multi-Purpose 
11356_White_Name_Badge 30854_CD_Label 30886_CD_Label Continuous_Narrow 
Continuous_Wide
Printer Phaser_8550DP__00_00_aa_a1_21_60_
PageSize/Media Size: *Letter Legal Executive IndexCard Statement 
FanFoldGermanLegal Env6x9 Env10 EnvMonarch EnvA7 Env5Half EnvPersonal A4 A5 A6 
ISOB5 B5 EnvDL EnvC5 EnvChou3 EnvChou4 Custom



have fun!

>> 
>> if it is possible to select the "most appropriate" printer based on  
>> characteristics of the print job.
>> 
>> CUPS looked pretty neat.  I imagined there might be some hidden  
>> configuration magic in it, so I thought I would ask the list to see if
>> 
>> anyone know of any. (^_^)
>> 
>> Ramsey
>> 
>> On Oct 25, 2009, at 6:39 PM, Andrew Lindesay wrote:
>> 
>>> Hi Ramsey;
>>> 
>>> Do you mean that you would like to change the default printer on a 
>> 
>>> users' machine from a web page?
>>> 
>>> cheers.
>>> 
>>>>> Are you able to just print directly to the printer from the  
>>>>> application server?
>>>>> 
>>> ...
>>>>>> Is it possible, if I have control of the client machines, to  
>>>>>> select a printer based on the printed page size?  Also, is it  
>>>>>> possible to bypass the print dialog?  I tried searching the Apple
>> 
>>>>>> printing list but didn't come up with a lot of answers...
>>> ...
>>>> I was thinking of something like a star printer hooked to a client 
>> 
>>>> machine.  Is there anything in OS X that would let me configure the
>> 
>>>> OS to automatically send jobs to the right place?  I found
>>> 
>>> ___
>>> Andrew Lindesay
>>> www.lindesay.co.nz
>>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 
> -- 
> 
> ------------------------------------------------------- 
> Pascal Robert 
> 
> http://www.macti.ca 
> http://www.linkedin.com/in/macti 
> 
> Skype: MacTICanada 
> AIM/iChat : MacTICanada 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/johan%40netsense.nl
> 
> This email sent to jo...@netsense.nl

Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to