Paul Verschoor
Paul Verschoor

Reputation: 1559

Correct use of option "-o CustomPrintSize=" in cups

On MacOS, when printing a pdf file from within an application (like Preview), I can click on Fiery Features and then on Full Properties and on the Media tab I can click in the Output Paper size on Custom and adjust Custom Paper Settings.

enter image description here

These settings are reflected in the generated postscript:

%%BeginFeature: *CustomPrintSize 599.53 841.89
userdict /XJXEFIsetpageproperties known
{<< /XJXsetPrintSize [ 599.53 841.89 0 0 1 ] >> XJXEFIsetpageproperties} if
%%EndFeature
%%BeginFeature: *EFPrintSize CustomPrintSize
%%EndFeature

But when I try to do this with the lp in the terminal:

lp -d MyPrinter some_file.pdf  -o PageSize=A4 -o EFPrintSize=CustomPrintSize -o CustomPrintSize="600.00x842.00"

There is no %%BeginFeature: *CustomPrintSize in the generated postscript and the print is not the way I want it to be.

I have tried numerous styles for -o CustomPrintSize

-o CustomPrintSize=600x842
-o CustomPrintSize="600x842"
-o CustomPrintSize="600 842"
-o CustomPrintSize=[600,842]
-o CustomPrintSize="211.5x297.0mm"
-o CustomPrintSize="Custom.211.5x297.0mm"
-o CustomPaperSize=600x842

I really need to print from the terminal, because that is scriptable.

What is the correct way to add an option to the lp command to set the CustomPrintSize option

P.S. In the MacOS Gui printer driver settings, they speak about Custom Paper Size', but the .ppd file, and the generated Postscript all use the termCustomPrintSize`, it is a bit confusing but I tried both.

Upvotes: 1

Views: 1430

Answers (1)

Kurt Pfeifle
Kurt Pfeifle

Reputation: 90253

With CUPS' lp command, the "official" way to use custom page sizes is with this syntax:

lp printername -o media=Custom.WIDTHxLENGTH filename # Set size in PostScript points lp printername -o media=Custom.WIDTHxLENGTHin filename # Set size as inches lp printername -o media=Custom.WIDTHxLENGTHcm filename # Set size as centimeters lp printername -o media=Custom.WIDTHxLENGTHmm filename # Set size as millimeters

No idea how this will interact with your proprietary Fiery controller/printer, though.

Upvotes: 2

Related Questions