如何编辑 CUPS 的 PPD 文件?

如何编辑 CUPS 的 PPD 文件?

我有一台联网打印机(佳能 iP8720),它在 Kubuntu 22.10 上与 CUPS 配合使用时,开箱即用。但是,该打印机能够进行无边界打印,分辨率高于目前限制的 600dpi,还有其他一些功能。我曾尝试手动编辑它的 PPD 文件,但总是失败,即使只做了一些微小的更改。我主要了解 PPD 文件参数的作用,但我在这个领域还是个新手。

首先,我怎样才能让它进行无边界打印?我已经更改了 hwmargins 以及不同页面大小的打印区域,但无济于事。

其次,我怎样才能使分辨率更高(黑白分辨率为 600dpi,彩色分辨率为 9600x2400)并使其在黑白分辨率下限制为 600dpi?那么,我怎样才能知道哪些分辨率受支持?

最后,从长远角度考虑,CUPS 如何确定打印机的参数并将其转换为 PPD 文件?我的想法是,如果它在执行此过程时缺少一些非常重要的功能,那么也许在这方面还有改进的空间;也许我可以利用我(糟糕的)编程技能来使 CUPS 更加强大。哈哈,是的,但我可以梦想。

这是 PPD 的编辑版本。是否存在任何明显的错误?

*PPD-Adobe: "4.3"
*FormatVersion: "4.3"
*FileVersion: "1.28.16"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*FileSystem: False
*PCFileName: "drvless.ppd"
*Manufacturer: "Canon"
*ModelName: "Canon iP8720"
*Product: "(Canon iP8720)"
*NickName: "Canon iP8720, driverless, cups-filters 1.28.16"
*ShortNickName: "Canon iP8720"
*DefaultOutputOrder: Reverse
*ColorDevice: True
*cupsVersion: 2.4
*cupsSNMPSupplies: False
*cupsLanguages: "en"
*cupsFilter2: "image/urf image/urf 0 -"
*cupsFilter2: "image/jpeg image/jpeg 0 -"
*cupsManualCopies: True
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: 4x6
*PageSize 3.5x5/3.5 x 5″: "<</PageSize[252 360]>>setpagedevice"
*PageSize 4x6/4 x 6″: "<</PageSize[288 432]>>setpagedevice"
*PageSize 5x7/5 x 7″: "<</PageSize[360 504]>>setpagedevice"
*PageSize 8x10/8 x 10″: "<</PageSize[576 720]>>setpagedevice"
*PageSize 13x19/13 x 19": "<</PageSize[936 1368]>>setpagedevice"
*PageSize Env10/Envelope #10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageSize EnvDL/Envelope DL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageSize Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageSize Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageSize Tabloid/11 x 17″: "<</PageSize[792 1224]>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: 4x6
*PageRegion 3.5x5/3.5 x 5″: "<</PageSize[252 360]>>setpagedevice"
*PageRegion 4x6/4 x 6″: "<</PageSize[288 432]>>setpagedevice"
*PageRegion 5x7/5 x 7″: "<</PageSize[360 504]>>setpagedevice"
*PageRegion 8x10/8 x 10″: "<</PageSize[576 720]>>setpagedevice"
*PageRegion 13x19/13 x 19": "<</PageSize[936 1368]>>setpagedevice"
*PageRegion Env10/Envelope #10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageRegion EnvDL/Envelope DL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageRegion Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageRegion Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageRegion Tabloid/11 x 17″: "<</PageSize[792 1224]>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: 4x6
*DefaultPaperDimension: 4x6
*ImageableArea 3.5x5: "0 0 252 360"
*PaperDimension 3.5x5: "252 360"
*ImageableArea 4x6: "0 0 288 432"
*PaperDimension 4x6: "288 432"
*ImageableArea 5x7: "0 0 360 504"
*PaperDimension 5x7: "360 504"
*ImageableArea 8x10: "0 0 576 720"
*PaperDimension 8x10: "576 720"
*ImageableArea 13x19: "0 0 936 1368"
*PaperDimension 13x19: "936 1368"
*ImageableArea Env10: "0 0 296.985826771654 684"
*PaperDimension Env10: "296.985826771654 684"
*ImageableArea EnvDL: "0 0 311.811023622047 623.622047244094"
*PaperDimension EnvDL: "311.811023622047 623.622047244094"
*ImageableArea Legal: "0 0 612 1008"
*PaperDimension Legal: "612 1008"
*ImageableArea Letter: "0 0 612 792"
*PaperDimension Letter: "612 792"
*ImageableArea Tabloid: "0 0 792 1224"
*PaperDimension Tabloid: "792 1224"
*HWMargins: "0 0 0 0"
*ParamCustomPageSize Width: 1 points 252.283464566929 932.59842519685
*ParamCustomPageSize Height: 2 points 360 1916.220472440945
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 3
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
*OpenUI *InputSlot/Media Source: PickOne
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Auto
*InputSlot Main/Main: "<</MediaPosition 1>>setpagedevice"
*InputSlot Auto/Automatic: "<</MediaPosition 0>>setpagedevice"
*CloseUI: *InputSlot
*OpenUI *MediaType/Media Type: PickOne
*OrderDependency: 10 AnySetup *MediaType
*DefaultMediaType: Photographic
*MediaType Stationery/Stationery: "<</MediaType(Stationery)>>setpagedevice"
*MediaType Photographic/Photo Paper: "<</MediaType(Photographic)>>setpagedevice"
*MediaType Envelope/Envelope: "<</MediaType(Envelope)>>setpagedevice"
*CloseUI: *MediaType
*% ColorModel from urf-supported
*OpenUI *ColorModel/Print Color Mode: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*ColorModel RGB/Color: "<</cupsColorSpace 19/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel Gray/Monochrome: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*DefaultColorModel: RGB
*CloseUI: *ColorModel
*OpenUI *OutputBin/Output Tray: PickOne
*OrderDependency: 10 AnySetup *OutputBin
*DefaultOutputBin: FaceUp
*OutputBin FaceUp/Face Up: ""
*PageStackOrder FaceUp: Reverse
*CloseUI: *OutputBin
*DefaultResolution: 600dpi
*OpenUI *cupsPrintQuality/Print Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Normal/Normal: "<</HWResolution[600 600]>>setpagedevice"
*cupsPrintQuality High/High: "<</HWResolution[1200 1200]>>setpagedevice"
*cupsPrintQuality Super/Super: "<</HWResolution[2400 2400]>>setpagedevice"
*cupsPrintQuality Ultra/Ultra: "<</HWResolution[9600 2400]>>setpagedevice"
*CloseUI: *cupsPrintQuality
*OpenUI *print-scaling/Print Scaling: PickOne
*OrderDependency: 10 AnySetup *print-scaling
*Defaultprint-scaling: auto
*print-scaling auto/Automatic: ""
*print-scaling auto-fit/Auto-fit: ""
*print-scaling fill/Fill: ""
*print-scaling fit/Fit: ""
*print-scaling none/None: ""
*CloseUI: *print-scaling
*cupsFilter2: "application/vnd.cups-pdf application/pdf 0 -"

相关内容