OpenPrinting / libppd

Apache License 2.0
2 stars 13 forks source link

Is this quality range right? #2

Closed lbschenkel closed 1 year ago

lbschenkel commented 1 year ago

I'm using driverless to generate a PPD for my Brother MFC-L2730DW laser printer (debug output included at the bottom).

The printer publishes the following attributes:

        document-format-supported (1setOf mimeMediaType) = application/octet-stream,image/urf,image/pwg-raster
        printer-device-id (textWithoutLanguage) = MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-L2730DW series;CLS:PRINTER;CID:Brother Laser Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;
        urf-supported (1setOf keyword) = W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1
        document-format-preferred (mimeMediaType) = image/urf
        print-quality-default (enum) = normal
        print-quality-supported (1setOf enum) = normal,high,draft
        printer-resolution-default (resolution) = 600dpi
        printer-resolution-supported (1setOf resolution) = 600dpi,300dpi,1200dpi
        pwg-raster-document-resolution-supported (resolution) = 600dpi

Given the above I was expecting the 3 quality profiles to be 300/600/1200 with a default of 600. But the PPD generated by driverless contains:

*DefaultResolution: 1200dpi
*cupsPrintQuality Draft/Draft: "<</HWResolution[300 300]>>setpagedevice"
*cupsPrintQuality Normal/Normal: "<</HWResolution[1200 1200]>>setpagedevice"
*cupsPrintQuality High/High: "<</HWResolution[1200 1200]>>setpagedevice"

I have read the code and my understanding of the implementation is that:

Is this the intended behaviour in such a scenario? I would argue that, given the attributes above, anything which is not 300/600/1200 can be surprising behaviour to the user. It basically collapses the 3 quality profiles into 2.

In particular, would it be possible to elaborate as to why the algorithm determining the resolution choices for URF only picks the worst/best resolutions and ignores everything in between?

DEBUG2: Requested IPP attributes (get-printer-attributes) for printer with URI ipps://REDACATED:443/
DEBUG2: Full list of all IPP attributes:
DEBUG2:   Attr: attributes-charset
DEBUG2:   Value: utf-8
DEBUG2:   Keyword: utf-8
DEBUG2:   Attr: attributes-natural-language
DEBUG2:   Value: en-dk
DEBUG2:   Keyword: en-dk
DEBUG2:   Attr: copies-default
DEBUG2:   Value: 1
DEBUG2:   Attr: finishings-default
DEBUG2:   Value: none
DEBUG2:   Attr: media-default
DEBUG2:   Value: iso_a4_210x297mm
DEBUG2:   Keyword: iso_a4_210x297mm
DEBUG2:   Attr: media-col-default
DEBUG2:   Value: {media-type=stationery media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=auto media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}}
DEBUG2:   Attr: orientation-requested-default
DEBUG2:   Value: portrait
DEBUG2:   Attr: output-bin-default
DEBUG2:   Value: face-down
DEBUG2:   Keyword: face-down
DEBUG2:   Attr: output-mode-default
DEBUG2:   Value: monochrome
DEBUG2:   Keyword: monochrome
DEBUG2:   Attr: print-quality-default
DEBUG2:   Value: normal
DEBUG2:   Attr: printer-resolution-default
DEBUG2:   Value: 600dpi
DEBUG2:   Attr: sides-default
DEBUG2:   Value: two-sided-long-edge
DEBUG2:   Keyword: two-sided-long-edge
DEBUG2:   Attr: print-color-mode-default
DEBUG2:   Value: monochrome
DEBUG2:   Keyword: monochrome
DEBUG2:   Attr: print-content-optimize-default
DEBUG2:   Value: auto
DEBUG2:   Keyword: auto
DEBUG2:   Attr: print-scaling-default
DEBUG2:   Value: auto
DEBUG2:   Keyword: auto
DEBUG2:   Attr: copies-supported
DEBUG2:   Value: 1-99
DEBUG2:   Attr: finishings-supported
DEBUG2:   Value: none
DEBUG2:   Attr: media-supported
DEBUG2:   Value: iso_a4_210x297mm,na_letter_8.5x11in,na_legal_8.5x14in,na_executive_7.25x10.5in,iso_a5_148x210mm,iso_a6_105x148mm,iso_b5_176x250mm,na_number-10_4.125x9.5in,iso_dl_110x220mm,iso_c5_162x229mm,na_monarch_3.875x7.5in,na_index-3x5_3x5in,na_foolscap_8.5x13in,na_oficio_8.5x13.4in,om_india-legal_215x345mm,custom_min_76.2x127mm,custom_max_215.9x355.6mm
DEBUG2:   Keyword: iso_a4_210x297mm
DEBUG2:   Keyword: na_letter_8.5x11in
DEBUG2:   Keyword: na_legal_8.5x14in
DEBUG2:   Keyword: na_executive_7.25x10.5in
DEBUG2:   Keyword: iso_a5_148x210mm
DEBUG2:   Keyword: iso_a6_105x148mm
DEBUG2:   Keyword: iso_b5_176x250mm
DEBUG2:   Keyword: na_number-10_4.125x9.5in
DEBUG2:   Keyword: iso_dl_110x220mm
DEBUG2:   Keyword: iso_c5_162x229mm
DEBUG2:   Keyword: na_monarch_3.875x7.5in
DEBUG2:   Keyword: na_index-3x5_3x5in
DEBUG2:   Keyword: na_foolscap_8.5x13in
DEBUG2:   Keyword: na_oficio_8.5x13.4in
DEBUG2:   Keyword: om_india-legal_215x345mm
DEBUG2:   Keyword: custom_min_76.2x127mm
DEBUG2:   Keyword: custom_max_215.9x355.6mm
DEBUG2:   Attr: media-col-supported
DEBUG2:   Value: media-type,media-size,media-top-margin,media-left-margin,media-right-margin,media-bottom-margin,media-source,media-auto-dimension,media-source-propaties
DEBUG2:   Keyword: media-type
DEBUG2:   Keyword: media-size
DEBUG2:   Keyword: media-top-margin
DEBUG2:   Keyword: media-left-margin
DEBUG2:   Keyword: media-right-margin
DEBUG2:   Keyword: media-bottom-margin
DEBUG2:   Keyword: media-source
DEBUG2:   Keyword: media-auto-dimension
DEBUG2:   Keyword: media-source-propaties
DEBUG2:   Attr: orientation-requested-supported
DEBUG2:   Value: portrait,landscape
DEBUG2:   Attr: output-bin-supported
DEBUG2:   Value: face-down
DEBUG2:   Keyword: face-down
DEBUG2:   Attr: output-mode-supported
DEBUG2:   Value: monochrome,auto,auto-monochrome
DEBUG2:   Keyword: monochrome
DEBUG2:   Keyword: auto
DEBUG2:   Keyword: auto-monochrome
DEBUG2:   Attr: print-quality-supported
DEBUG2:   Value: normal,high,draft
DEBUG2:   Attr: printer-resolution-supported
DEBUG2:   Value: 600dpi,300dpi,1200dpi
DEBUG2:   Attr: sides-supported
DEBUG2:   Value: one-sided,two-sided-long-edge,two-sided-short-edge
DEBUG2:   Keyword: one-sided
DEBUG2:   Keyword: two-sided-long-edge
DEBUG2:   Keyword: two-sided-short-edge
DEBUG2:   Attr: print-color-mode-supported
DEBUG2:   Value: monochrome,auto,auto-monochrome
DEBUG2:   Keyword: monochrome
DEBUG2:   Keyword: auto
DEBUG2:   Keyword: auto-monochrome
DEBUG2:   Attr: print-content-optimize-supported
DEBUG2:   Value: auto
DEBUG2:   Keyword: auto
DEBUG2:   Attr: print-scaling-supported
DEBUG2:   Value: auto,auto-fit,fill,fit,none
DEBUG2:   Keyword: auto
DEBUG2:   Keyword: auto-fit
DEBUG2:   Keyword: fill
DEBUG2:   Keyword: fit
DEBUG2:   Keyword: none
DEBUG2:   Attr: generated-natural-language-supported
DEBUG2:   Value: sv,en,no,da,fi
DEBUG2:   Keyword: sv
DEBUG2:   Keyword: en
DEBUG2:   Keyword: no
DEBUG2:   Keyword: da
DEBUG2:   Keyword: fi
DEBUG2:   Attr: printer-uri-supported
DEBUG2:   Value: ipp://REDACATED/ipp/print,ipps://REDACATED:443/ipp/print
DEBUG2:   Keyword: ipp://REDACATED/ipp/print
DEBUG2:   Keyword: ipps://REDACATED:443/ipp/print
DEBUG2:   Attr: uri-security-supported
DEBUG2:   Value: none,tls
DEBUG2:   Keyword: none
DEBUG2:   Keyword: tls
DEBUG2:   Attr: uri-authentication-supported
DEBUG2:   Value: none,none
DEBUG2:   Keyword: none
DEBUG2:   Keyword: none
DEBUG2:   Attr: printer-name
DEBUG2:   Value: BRNB42200803A07
DEBUG2:   Keyword: BRNB42200803A07
DEBUG2:   Attr: printer-location
DEBUG2:   Value: 
DEBUG2:   Keyword: 
DEBUG2:   Attr: printer-info
DEBUG2:   Value: Brother MFC-L2730DW series[en]
DEBUG2:   Keyword: Brother MFC-L2730DW series
DEBUG2:   Attr: printer-make-and-model
DEBUG2:   Value: Brother MFC-L2730DW series[en]
DEBUG2:   Keyword: Brother MFC-L2730DW series
DEBUG2:   Attr: printer-state
DEBUG2:   Value: idle
DEBUG2:   Attr: printer-state-reasons
DEBUG2:   Value: none
DEBUG2:   Keyword: none
DEBUG2:   Attr: ipp-versions-supported
DEBUG2:   Value: 1.0,1.1,2.0
DEBUG2:   Keyword: 1.0
DEBUG2:   Keyword: 1.1
DEBUG2:   Keyword: 2.0
DEBUG2:   Attr: operations-supported
DEBUG2:   Value: Print-Job,Validate-Job,Create-Job,Send-Document,Cancel-Job,Get-Job-Attributes,Get-Jobs,Get-Printer-Attributes,Close-Job,Identify-Printer
DEBUG2:   Attr: multiple-document-jobs-supported
DEBUG2:   Value: false
DEBUG2:   Attr: multiple-operation-time-out
DEBUG2:   Value: 150
DEBUG2:   Attr: natural-language-configured
DEBUG2:   Value: en
DEBUG2:   Keyword: en
DEBUG2:   Attr: charset-configured
DEBUG2:   Value: utf-8
DEBUG2:   Keyword: utf-8
DEBUG2:   Attr: charset-supported
DEBUG2:   Value: utf-8
DEBUG2:   Keyword: utf-8
DEBUG2:   Attr: document-format-supported
DEBUG2:   Value: application/octet-stream,image/urf,image/pwg-raster
DEBUG2:   Keyword: application/octet-stream
DEBUG2:   Keyword: image/urf
DEBUG2:   Keyword: image/pwg-raster
DEBUG2:   Attr: document-format-default
DEBUG2:   Value: application/octet-stream
DEBUG2:   Keyword: application/octet-stream
DEBUG2:   Attr: printer-is-accepting-jobs
DEBUG2:   Value: true
DEBUG2:   Attr: queued-job-count
DEBUG2:   Value: 0
DEBUG2:   Attr: pdl-override-supported
DEBUG2:   Value: attempted
DEBUG2:   Keyword: attempted
DEBUG2:   Attr: printer-up-time
DEBUG2:   Value: 5976
DEBUG2:   Attr: compression-supported
DEBUG2:   Value: none,gzip
DEBUG2:   Keyword: none
DEBUG2:   Keyword: gzip
DEBUG2:   Attr: color-supported
DEBUG2:   Value: false
DEBUG2:   Attr: job-creation-attributes-supported
DEBUG2:   Value: copies,finishings,ipp-attribute-fidelity,job-name,media,media-col,orientation-requested,output-bin,output-mode,print-quality,printer-resolution,requesting-user-name,sides,print-color-mode
DEBUG2:   Keyword: copies
DEBUG2:   Keyword: finishings
DEBUG2:   Keyword: ipp-attribute-fidelity
DEBUG2:   Keyword: job-name
DEBUG2:   Keyword: media
DEBUG2:   Keyword: media-col
DEBUG2:   Keyword: orientation-requested
DEBUG2:   Keyword: output-bin
DEBUG2:   Keyword: output-mode
DEBUG2:   Keyword: print-quality
DEBUG2:   Keyword: printer-resolution
DEBUG2:   Keyword: requesting-user-name
DEBUG2:   Keyword: sides
DEBUG2:   Keyword: print-color-mode
DEBUG2:   Attr: media-bottom-margin-supported
DEBUG2:   Value: 432
DEBUG2:   Attr: media-left-margin-supported
DEBUG2:   Value: 432
DEBUG2:   Attr: media-right-margin-supported
DEBUG2:   Value: 432
DEBUG2:   Attr: media-source-supported
DEBUG2:   Value: auto,manual,tray-1
DEBUG2:   Keyword: auto
DEBUG2:   Keyword: manual
DEBUG2:   Keyword: tray-1
DEBUG2:   Attr: media-top-margin-supported
DEBUG2:   Value: 432
DEBUG2:   Attr: media-type-supported
DEBUG2:   Value: stationery,stationery-lightweight,stationery-heavyweight,stationery-cover,envelope,envelope-heavyweight,envelope-lightweight,stationery-recycled,labels,stationery-bond,com.brother.thicker,com.brother.recycled
DEBUG2:   Keyword: stationery
DEBUG2:   Keyword: stationery-lightweight
DEBUG2:   Keyword: stationery-heavyweight
DEBUG2:   Keyword: stationery-cover
DEBUG2:   Keyword: envelope
DEBUG2:   Keyword: envelope-heavyweight
DEBUG2:   Keyword: envelope-lightweight
DEBUG2:   Keyword: stationery-recycled
DEBUG2:   Keyword: labels
DEBUG2:   Keyword: stationery-bond
DEBUG2:   Keyword: com.brother.thicker
DEBUG2:   Keyword: com.brother.recycled
DEBUG2:   Attr: media-size-supported
DEBUG2:   Value: {x-dimension=21000 y-dimension=29700},{x-dimension=21590 y-dimension=27940},{x-dimension=21590 y-dimension=35560},{x-dimension=18415 y-dimension=26670},{x-dimension=14800 y-dimension=21000},{x-dimension=10500 y-dimension=14800},{x-dimension=17600 y-dimension=25000},{x-dimension=10477 y-dimension=24130},{x-dimension=11000 y-dimension=22000},{x-dimension=16200 y-dimension=22900},{x-dimension=9842 y-dimension=19050},{x-dimension=7620 y-dimension=12700},{x-dimension=21590 y-dimension=33020},{x-dimension=21590 y-dimension=34036},{x-dimension=21500 y-dimension=34500},{x-dimension=7620-21590 y-dimension=12700-35560}
DEBUG2:   Attr: pages-per-minute
DEBUG2:   Value: 34
DEBUG2:   Attr: printer-alert
DEBUG2:   Value: code=other
DEBUG2:   Attr: printer-alert-description
DEBUG2:   Value: Sleep[en]
DEBUG2:   Keyword: Sleep
DEBUG2:   Attr: printer-device-id
DEBUG2:   Value: MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-L2730DW series;CLS:PRINTER;CID:Brother Laser Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;[en]
DEBUG2:   Keyword: MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-L2730DW series;CLS:PRINTER;CID:Brother Laser Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;
DEBUG2:   Attr: printer-icons
DEBUG2:   Value: https://REDACATED/ipp/printer-icons-128.png,https://REDACATED/ipp/printer-icons-512.png
DEBUG2:   Keyword: https://REDACATED/ipp/printer-icons-128.png
DEBUG2:   Keyword: https://REDACATED/ipp/printer-icons-512.png
DEBUG2:   Attr: printer-more-info
DEBUG2:   Value: https://REDACATED/net/net/airprint.html
DEBUG2:   Keyword: https://REDACATED/net/net/airprint.html
DEBUG2:   Attr: printer-uuid
DEBUG2:   Value: urn:uuid:e3248000-80ce-11db-8000-b42200803a07
DEBUG2:   Keyword: urn:uuid:e3248000-80ce-11db-8000-b42200803a07
DEBUG2:   Attr: job-impressions-supported
DEBUG2:   Value: 1-999
DEBUG2:   Attr: printer-geo-location
DEBUG2:   Value: unknown
DEBUG2:   Attr: printer-supply-info-uri
DEBUG2:   Value: https://REDACATED/general/status.html
DEBUG2:   Keyword: https://REDACATED/general/status.html
DEBUG2:   Attr: media-ready
DEBUG2:   Value: iso_a4_210x297mm
DEBUG2:   Keyword: iso_a4_210x297mm
DEBUG2:   Attr: media-col-ready
DEBUG2:   Value: {media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}}
DEBUG2:   Attr: identify-actions-default
DEBUG2:   Value: flash,sound
DEBUG2:   Keyword: flash
DEBUG2:   Keyword: sound
DEBUG2:   Attr: identify-actions-supported
DEBUG2:   Value: flash,sound
DEBUG2:   Keyword: flash
DEBUG2:   Keyword: sound
DEBUG2:   Attr: ipp-features-supported
DEBUG2:   Value: airprint-1.7,wfds-print-1.0
DEBUG2:   Keyword: airprint-1.7
DEBUG2:   Keyword: wfds-print-1.0
DEBUG2:   Attr: printer-input-tray
DEBUG2:   Value: type=other;mediafeed=296926;mediaxfeed=209973;maxcapacity=250;level=-3;status=0;name=AUTO;index=1;dimunit=micrometers;unit=sheets;medianame=THIN;mediaweight=-2;mediatype=Unknown;mediacolor=Unknown;,type=sheetFeedManual;mediafeed=-2;mediaxfeed=-2;maxcapacity=1;level=-3;status=0;name=MANUAL\ TRAY;index=2;dimunit=micrometers;unit=sheets;medianame=THIN;mediaweight=-2;mediatype=Unknown;mediacolor=Unknown;,type=sheetFeedAutoNonRemovableTray;mediafeed=296926;mediaxfeed=209973;maxcapacity=250;level=-3;status=0;name=TRAY1;index=3;dimunit=micrometers;unit=sheets;medianame=REGULAR;mediaweight=-2;mediatype=Unknown;mediacolor=Unknown;
DEBUG2:   Attr: printer-output-tray
DEBUG2:   Value: type=unRemovableBin;maxcapacity=-2;remaining=-2;status=0;name=face-down;index=1;unit=sheets;stackingorder=firstToLast;pagedelivery=notPresent;offsetstacking=notPresent;
DEBUG2:   Attr: print_wfds
DEBUG2:   Value: T
DEBUG2:   Keyword: T
DEBUG2:   Attr: document-format-varying-attributes
DEBUG2:   Value: copies
DEBUG2:   Keyword: copies
DEBUG2:   Attr: multiple-operation-time-out-action
DEBUG2:   Value: abort-job
DEBUG2:   Keyword: abort-job
DEBUG2:   Attr: printer-organization
DEBUG2:   Value: 
DEBUG2:   Keyword: 
DEBUG2:   Attr: printer-organizational-unit
DEBUG2:   Value: 
DEBUG2:   Keyword: 
DEBUG2:   Attr: printer-get-attributes-supported
DEBUG2:   Value: document-format
DEBUG2:   Keyword: document-format
DEBUG2:   Attr: which-jobs-supported
DEBUG2:   Value: completed,not_completed
DEBUG2:   Keyword: completed
DEBUG2:   Keyword: not_completed
DEBUG2:   Attr: printer-current-time
DEBUG2:   Value: 2022-09-28T20:45:51Z
DEBUG2:   Attr: printer-config-change-time
DEBUG2:   Value: 1
DEBUG2:   Attr: printer-config-change-date-time
DEBUG2:   Value: 2022-09-28T16:16:21Z
DEBUG2:   Attr: printer-state-change-time
DEBUG2:   Value: 1
DEBUG2:   Attr: printer-state-change-date-time
DEBUG2:   Value: 2022-09-28T16:16:21Z
DEBUG2:   Attr: printer-strings-uri
DEBUG2:   Value: no-value
DEBUG2:   Attr: printer-mandatory-job-attributes
DEBUG2:   Value: attributes-charset,attributes-natural-language,printer-uri
DEBUG2:   Keyword: attributes-charset
DEBUG2:   Keyword: attributes-natural-language
DEBUG2:   Keyword: printer-uri
DEBUG2:   Attr: landscape-orientation-requested-preferred
DEBUG2:   Value: 5
DEBUG2:   Attr: marker-colors
DEBUG2:   Value: #000000[en]
DEBUG2:   Keyword: #000000
DEBUG2:   Attr: marker-high-levels
DEBUG2:   Value: 100
DEBUG2:   Attr: marker-levels
DEBUG2:   Value: 100
DEBUG2:   Attr: marker-low-levels
DEBUG2:   Value: 16
DEBUG2:   Attr: marker-names
DEBUG2:   Value: BK[en]
DEBUG2:   Keyword: BK
DEBUG2:   Attr: marker-types
DEBUG2:   Value: toner
DEBUG2:   Keyword: toner
DEBUG2:   Attr: pdf-versions-supported
DEBUG2:   Value: none
DEBUG2:   Keyword: none
DEBUG2:   Attr: printer-dns-sd-name
DEBUG2:   Value: Brother MFC-L2730DW series
DEBUG2:   Keyword: Brother MFC-L2730DW series
DEBUG2:   Attr: printer-firmware-name
DEBUG2:   Value: MAIN,SUB1,SUB5
DEBUG2:   Keyword: MAIN
DEBUG2:   Keyword: SUB1
DEBUG2:   Keyword: SUB5
DEBUG2:   Attr: printer-firmware-string-version
DEBUG2:   Value: Z2206231417:EF0D,1.12,1.05
DEBUG2:   Keyword: Z2206231417:EF0D
DEBUG2:   Keyword: 1.12
DEBUG2:   Keyword: 1.05
DEBUG2:   Attr: printer-firmware-version
DEBUG2:   Value: Z2206231417:EF0D,1.12,1.05
DEBUG2:   Attr: printer-kind
DEBUG2:   Value: document,envelope,label,postcard
DEBUG2:   Keyword: document
DEBUG2:   Keyword: envelope
DEBUG2:   Keyword: label
DEBUG2:   Keyword: postcard
DEBUG2:   Attr: urf-supported
DEBUG2:   Value: W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1
DEBUG2:   Keyword: W8
DEBUG2:   Keyword: CP1
DEBUG2:   Keyword: IS4-1
DEBUG2:   Keyword: MT1-3-4-5-8
DEBUG2:   Keyword: OB10
DEBUG2:   Keyword: PQ3-4-5
DEBUG2:   Keyword: RS300-600-1200
DEBUG2:   Keyword: V1.4
DEBUG2:   Keyword: DM1
DEBUG2:   Attr: document-format-preferred
DEBUG2:   Value: image/urf
DEBUG2:   Keyword: image/urf
DEBUG2:   Attr: mopria-certified
DEBUG2:   Value: 1.3
DEBUG2:   Keyword: 1.3
DEBUG2:   Attr: pwg-raster-document-resolution-supported
DEBUG2:   Value: 600dpi
DEBUG2:   Attr: pwg-raster-document-sheet-back
DEBUG2:   Value: rotated
DEBUG2:   Keyword: rotated
DEBUG2:   Attr: pwg-raster-document-type-supported
DEBUG2:   Value: sgray_8
DEBUG2:   Keyword: sgray_8
DEBUG2:   Attr: job-password-supported
DEBUG2:   Value: 4
DEBUG2:   Attr: job-password-length-supported
DEBUG2:   Value: 4-4
DEBUG2:   Attr: job-password-encryption-supported
DEBUG2:   Value: none
DEBUG2:   Keyword: none
DEBUG2:   Attr: job-password-repertoire-supported
DEBUG2:   Value: iana_us-ascii_digits
DEBUG2:   Keyword: iana_us-ascii_digits
DEBUG2:   Attr: job-password-repertoire-configured
DEBUG2:   Value: iana_us-ascii_digits
DEBUG2:   Keyword: iana_us-ascii_digits
DEBUG2:   Attr: media-col-database
DEBUG2:   Value: {media-type=stationery media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=21590 y-dimension=27940} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=21590 y-dimension=35560} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=18415 y-dimension=26670} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=10500 y-dimension=14800} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=21590 y-dimension=33020} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=21590 y-dimension=34036} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=21500 y-dimension=34500} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=long-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21590 y-dimension=27940} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21590 y-dimension=35560} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=18415 y-dimension=26670} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=10500 y-dimension=14800} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21590 y-dimension=33020} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21590 y-dimension=34036} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=21500 y-dimension=34500} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-heavyweight media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=long-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21590 y-dimension=27940} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21590 y-dimension=35560} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=18415 y-dimension=26670} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=10500 y-dimension=14800} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21590 y-dimension=33020} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21590 y-dimension=34036} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=21500 y-dimension=34500} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-type=stationery-recycled media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=tray-1 media-auto-dimension=false media-source-properties={media-source-feed-direction=long-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21000 y-dimension=29700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21590 y-dimension=27940} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21590 y-dimension=35560} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=18415 y-dimension=26670} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=14800 y-dimension=21000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=10500 y-dimension=14800} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=17600 y-dimension=25000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=10477 y-dimension=24130} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=11000 y-dimension=22000} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=16200 y-dimension=22900} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=9842 y-dimension=19050} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=7620 y-dimension=12700} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21590 y-dimension=33020} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21590 y-dimension=34036} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}},{media-size={x-dimension=21500 y-dimension=34500} media-bottom-margin=432 media-left-margin=432 media-right-margin=432 media-top-margin=432 media-source=manual media-auto-dimension=false media-source-properties={media-source-feed-direction=short-edge-first media-source-feed-orientation=3}}
DEBUG2: 
DEBUG: PPD generation successful: Apple Raster PPD generated.
DEBUG: Created temporary PPD file: /tmp/850c963357aa9
*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: "Brother"
*ModelName: "Brother MFC-L2730DW series"
*Product: "(Brother MFC-L2730DW series)"
*NickName: "Brother MFC-L2730DW series, driverless, cups-filters 1.28.16"
*ShortNickName: "Brother MFC-L2730DW series"
*DefaultOutputOrder: Normal
*ColorDevice: False
*cupsVersion: 2.4
*cupsSNMPSupplies: False
*cupsLanguages: "en"
*APSupplies: "https://REDACATED/net/net/airprint.html"
*cupsJobPassword: "1111"
*cupsFilter2: "image/urf image/urf 0 -"
*cupsManualCopies: True
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize 215x345mm: "<</PageSize[609.448818897638 977.952755905512]>>setpagedevice"
*PageSize 3x5/3 x 5″: "<</PageSize[216 360]>>setpagedevice"
*PageSize A4/A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageSize A5/A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageSize A6/A6: "<</PageSize[297.637795275591 419.527559055118]>>setpagedevice"
*PageSize Env10/Envelope OpenPrinting/cups-filters#10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageSize EnvC5/CEnvelope 5: "<</PageSize[459.212598425197 649.133858267717]>>setpagedevice"
*PageSize EnvDL/Envelope DL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageSize EnvMonarch/Envelope Monarch: "<</PageSize[278.985826771654 540]>>setpagedevice"
*PageSize Executive/Executive: "<</PageSize[522 756]>>setpagedevice"
*PageSize FanFoldGermanLegal/Foolscap: "<</PageSize[612 936]>>setpagedevice"
*PageSize ISOB5/Envelope B5: "<</PageSize[498.897637795276 708.661417322835]>>setpagedevice"
*PageSize Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageSize Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageSize Oficio/8.5 x 13.4″: "<</PageSize[612 964.8]>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion 215x345mm: "<</PageSize[609.448818897638 977.952755905512]>>setpagedevice"
*PageRegion 3x5/3 x 5″: "<</PageSize[216 360]>>setpagedevice"
*PageRegion A4/A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageRegion A5/A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageRegion A6/A6: "<</PageSize[297.637795275591 419.527559055118]>>setpagedevice"
*PageRegion Env10/Envelope OpenPrinting/cups-filters#10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageRegion EnvC5/CEnvelope 5: "<</PageSize[459.212598425197 649.133858267717]>>setpagedevice"
*PageRegion EnvDL/Envelope DL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageRegion EnvMonarch/Envelope Monarch: "<</PageSize[278.985826771654 540]>>setpagedevice"
*PageRegion Executive/Executive: "<</PageSize[522 756]>>setpagedevice"
*PageRegion FanFoldGermanLegal/Foolscap: "<</PageSize[612 936]>>setpagedevice"
*PageRegion ISOB5/Envelope B5: "<</PageSize[498.897637795276 708.661417322835]>>setpagedevice"
*PageRegion Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageRegion Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageRegion Oficio/8.5 x 13.4″: "<</PageSize[612 964.8]>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*DefaultPaperDimension: A4
*ImageableArea 215x345mm: "12.245669291339 12.245669291339 597.203149606299 965.707086614173"
*PaperDimension 215x345mm: "609.448818897638 977.952755905512"
*ImageableArea 3x5: "12.245669291339 12.245669291339 203.754330708661 347.754330708661"
*PaperDimension 3x5: "216 360"
*ImageableArea A4: "12.245669291339 12.245669291339 583.029921259842 829.644094488189"
*PaperDimension A4: "595.275590551181 841.889763779528"
*ImageableArea A5: "12.245669291339 12.245669291339 407.28188976378 583.029921259842"
*PaperDimension A5: "419.527559055118 595.275590551181"
*ImageableArea A6: "12.245669291339 12.245669291339 285.392125984252 407.28188976378"
*PaperDimension A6: "297.637795275591 419.527559055118"
*ImageableArea Env10: "12.245669291339 12.245669291339 284.740157480315 671.754330708661"
*PaperDimension Env10: "296.985826771654 684"
*ImageableArea EnvC5: "12.245669291339 12.245669291339 446.966929133858 636.888188976378"
*PaperDimension EnvC5: "459.212598425197 649.133858267717"
*ImageableArea EnvDL: "12.245669291339 12.245669291339 299.565354330709 611.376377952756"
*PaperDimension EnvDL: "311.811023622047 623.622047244094"
*ImageableArea EnvMonarch: "12.245669291339 12.245669291339 266.740157480315 527.754330708661"
*PaperDimension EnvMonarch: "278.985826771654 540"
*ImageableArea Executive: "12.245669291339 12.245669291339 509.754330708661 743.754330708661"
*PaperDimension Executive: "522 756"
*ImageableArea FanFoldGermanLegal: "12.245669291339 12.245669291339 599.754330708661 923.754330708661"
*PaperDimension FanFoldGermanLegal: "612 936"
*ImageableArea ISOB5: "12.245669291339 12.245669291339 486.651968503937 696.415748031496"
*PaperDimension ISOB5: "498.897637795276 708.661417322835"
*ImageableArea Legal: "12.245669291339 12.245669291339 599.754330708661 995.754330708661"
*PaperDimension Legal: "612 1008"
*ImageableArea Letter: "12.245669291339 12.245669291339 599.754330708661 779.754330708661"
*PaperDimension Letter: "612 792"
*ImageableArea Oficio: "12.245669291339 12.245669291339 599.754330708661 952.554330708661"
*PaperDimension Oficio: "612 964.8"
*HWMargins: "12.245669291339 12.245669291339 12.245669291339 12.245669291339"
*ParamCustomPageSize Width: 1 points 216 612
*ParamCustomPageSize Height: 2 points 360 1008
*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 Auto/Automatic: "<</MediaPosition 0>>setpagedevice"
*InputSlot Manual/Manual: "<</MediaPosition 4>>setpagedevice"
*InputSlot Tray1/Tray 1: "<</MediaPosition 20>>setpagedevice"
*CloseUI: *InputSlot
*OpenUI *MediaType/Media Type: PickOne
*OrderDependency: 10 AnySetup *MediaType
*DefaultMediaType: Stationery
*MediaType Stationery/Stationery: "<</MediaType(Stationery)>>setpagedevice"
*MediaType StationeryLightweight/Lightweight Paper: "<</MediaType(StationeryLightweight)>>setpagedevice"
*MediaType StationeryHeavyweight/Heavyweight Paper: "<</MediaType(StationeryHeavyweight)>>setpagedevice"
*MediaType StationeryCover: "<</MediaType(StationeryCover)>>setpagedevice"
*MediaType Envelope/Envelope: "<</MediaType(Envelope)>>setpagedevice"
*MediaType EnvelopeHeavyweight/Heavyweight Envelope: "<</MediaType(EnvelopeHeavyweight)>>setpagedevice"
*MediaType EnvelopeLightweight/Lightweight Envelope: "<</MediaType(EnvelopeLightweight)>>setpagedevice"
*MediaType StationeryRecycled: "<</MediaType(StationeryRecycled)>>setpagedevice"
*MediaType Labels/Labels: "<</MediaType(Labels)>>setpagedevice"
*MediaType StationeryBond: "<</MediaType(StationeryBond)>>setpagedevice"
*MediaType Com.brother.thicker: "<</MediaType(Com.brother.thicker)>>setpagedevice"
*MediaType Com.brother.recycled: "<</MediaType(Com.brother.recycled)>>setpagedevice"
*CloseUI: *MediaType
*% ColorModel from urf-supported
*OpenUI *ColorModel/Print Color Mode: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*ColorModel Gray/Monochrome: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*DefaultColorModel: Gray
*CloseUI: *ColorModel
*OpenUI *Duplex/2-Sided Printing: PickOne
*OrderDependency: 10 AnySetup *Duplex
*DefaultDuplex: None
*Duplex None/Off: "<</Duplex false>>setpagedevice"
*Duplex DuplexNoTumble/On (Portrait): "<</Duplex true/Tumble false>>setpagedevice"
*Duplex DuplexTumble/On (Landscape): "<</Duplex true/Tumble true>>setpagedevice"
*CloseUI: *Duplex
*cupsBackSide: Normal
*OpenUI *OutputBin/Output Tray: PickOne
*OrderDependency: 10 AnySetup *OutputBin
*DefaultOutputBin: FaceDown
*OutputBin FaceDown/Face Down: ""
*PageStackOrder FaceDown: Normal
*CloseUI: *OutputBin
*DefaultResolution: 1200dpi
*OpenUI *cupsPrintQuality/Print Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Draft/Draft: "<</HWResolution[300 300]>>setpagedevice"
*cupsPrintQuality Normal/Normal: "<</HWResolution[1200 1200]>>setpagedevice"
*cupsPrintQuality High/High: "<</HWResolution[1200 1200]>>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
CodingWarrior33 commented 1 year ago

Hey there @lbschenkel !!

You can try using the following command to print specifically in 600 dpi:

lp -o media= <Page Size> -o resolution=600dpi FILENAME

Here <Page Size> can be replaced with A4 or any page dimension as needed.

Also I think the algorithm behaviour is expected. A resolution entry can only be nullified if either the resolution list entry is missing or if it contains broken entries.

In your case it might be the second case due to which the following command gets executed: goto bad_ppd;

The function bad_ppd is as follows:

bad_ppd:

  if (common_res) cupsArrayDelete(common_res);
  if (common_def) free(common_def);
  if (min_res) free(min_res);
  if (max_res) free(max_res);
  ...
  return (NULL);

Here the 600 dpi quality gets referenced as bad ppd due to which the current is deleted and next is taken as default.

Further code can be referred to in the following directory : Cups/PPD

Hope this helps :+1: !

tillkamppeter commented 1 year ago

@CodingWarrior33 you cannot force a job to get printed in a resolution not listed in the PPD file. Specifying such a resolution on the command line does not change anything, the option will get ignored and the printer will print with 300 dpi or 1200 dpi.

We have a bug in the code of the PPD generator (file ppd/ppd-generator.c in the source code of cups-filters). You need to find out what is wrong in the code.

CodingWarrior33 commented 1 year ago

@tillkamppeter with the implementation of commit 808f439f73b947eb1b376e2c3d5c576e445de543 does this issue still remain relevant as the file being referenced has been moved to libppd and the repository has been labelled as legacy ?

tillkamppeter commented 1 year ago

Yes, it is still relevant, as even libppd being legacy, we still fix bugs in it.

I have moved it to libppd now.

lbschenkel commented 1 year ago

We have a bug in the code of the PPD generator (file ppd/ppd-generator.c in the source code of cups-filters). You need to find out what is wrong in the code.

Sorry, I'm confused about "what's wrong in the code": the algorithm starting at https://github.com/OpenPrinting/libppd/blob/master/ppd/ppd-generator.c#L612 seems to be clear — if Apple raster is supported, it only takes the lowest and highest resolutions, and ignores anything in between. I'm not quite sure what is the reasoning behind this and why it is only done for Apple raster.

Given that you said "we have a bug in the code" I'm assuming that you agree that the generated PPD, given the published printer attributes, is sub-optimal. It makes no sense to me to have 3 quality profiles and only use 2 resolutions from the printer attributes (worse: ignoring the printer's "best" resolution in terms of tradeoff toner/quality/speed).

In my naïve thinking I would assume that the PPD's draft/normal/high quality profiles should map to the printer's lowest/default/highest resolutions in most circumstances.

tillkamppeter commented 1 year ago

@lbschenkel the reasoning behind only taking the lowest and the highest resolution from the resolutions in urf-supported is that perhaps neither @michaelrsweet nor me ever have seen an urf-supported entry with three resolutions. The original code of the PPD generator comes from @michaelrsweet and I have overtaken it, assuming that he knows urf-supported, with so many years working at Apple ... So now the bug is spotted, the PPD generator only supports urf-supported with two resolutions. This piece of code needs to get fixed, to support any number of resolutions, ideally taking the highest resolution for high quality, the lowest resolution for draft quality and the "middle" one for normal quality. If the number of resolutions is odd, it is clear, if it is even, we should "round down", for example taking the first entry of two available ones. @CodingWarrior33 could you do this fix?

lbschenkel commented 1 year ago

@tillkamppeter: it makes some historical sense, yes.

I actually see 2 issues:

  1. the one we are discussing here (resolutions being dropped)
  2. in case there are only 2 usable resolutions (or 1), the PPD should only contain draft/high or normal/high quality profiles instead of draft/normal/high, because as an user it is confusing when multiple quality profiles are made available but some of those are actually identical to other worse/better profiles
lbschenkel commented 1 year ago

ideally taking the highest resolution for high quality, the lowest resolution for draft quality and the "middle" one for normal quality.

This is sensible and would be my choice as well, but perhaps even better is picking printer-resolution-default for the normal quality profile, assuming it is among the available resolutions and it is > lowest and < highest (in order to avoid "duplication" of quality profiles).

CodingWarrior33 commented 1 year ago

@tillkamppeter @lbschenkel what I understand is that I need to implement a resolution array. 1.The resolution array if having odd length can take resolutions as mentioned by taking highest, middle and lowest. 2.For even length the array will have to choose between 2 profiles (preferably the lower one) as there is no perfect "middle" for an even entry. 3.If lesser usable resolutions are available then we should consider revising the profiles to only draft/default(normal) as there are lesser supported resolutions to avoid duplication. 4.The printer-default resolution should be always preferred over others.

lbschenkel commented 1 year ago

@tillkamppeter : Agree with all the points, this is what I was suggesting as well (perhaps poorly phrased).

lbschenkel commented 1 year ago

Trying to phrase it better:

Regarding point 4, if the algorithm is if(default > lowest && default < highest && default in [resolutions]) then normal = default then you're also potentially addressing points 1 and 2. Points 1 and 2 then became the fallback algorithm in case the aforementioned test is false.

This fallback algorithm could also be picking the highest resolution that is <= (lowest + highest)/2. That is closest to the middle of the road, so to speak, and then also becomes indifferent to even/odd number of elements or an uneven distribution of resolutions in the list.

tillkamppeter commented 1 year ago

Yes, so we will do:

CodingWarrior33 commented 1 year ago

Yes, so we will do:

  • Draft Quality: Lowest resolution
  • High Quality: Highest resolution
  • Normal Quality: If there is printer-default-resolution and this resolution is in the list, use it. If not, use the "middle" one, rounding down if the number of available resolutions is even.
  • Duplicate resolutions are no problem, at least if there are other things which also get changed by the print quality.

@tillkamppeter @lbschenkel this sums it up and to add to above mentioned we still keep duplicate resolutions unless there is an effect on print quality due to other factors.

lbschenkel commented 1 year ago

@tillkamppeter @lbschenkel this sums it up and to add to above mentioned we still keep duplicate resolutions unless there is an effect on print quality due to other factors.

Understood, although if you look at the PPD I posted in my printer the quality is only affecting resolution, and nothing else.

CodingWarrior33 commented 1 year ago

Ok, will work on the above stated points.

lbschenkel commented 1 year ago

Sorry to hijack this for an off-topic question, but: does it still make sense to have two separate PPD generators: "ippeve.ppd" and "drvless.ppd"? I understand why that was necessary when CUPS was under Apple stewardship, but now that CUPS became an OpenPrinting project, shouldn't both be unified?

tillkamppeter commented 1 year ago

The reason why cups-filters had and now libppd has its own PPD generator is the fact that it is used by cups-browsed to generate PPDs for a cluster of different printers. This needed adaptations in the PPD generator and therefore I was not able to re-merge the CUPS one and the libppd one. Now the PPD generators will fade away with the demise of PPD file use in the general printing workflow and therefore the effort of trying to re-merge them is not worth it any more. cups-browsed will later on be turned into a Printer Application for clustering and adapting to old enterprise distros (with CUPS <= 1.5.x) and so it will not need the PPD generator any more. CUPS will not contain its own PPD generator any more starting with version 3.0. So there stays a single PPD generator in libppd and probably I can deprecate this one right away (to go away in libppd3) as the legacy task of libppd is reading and understanding/converting to IPP attributes PPD files, not creating them.

tillkamppeter commented 1 year ago

Fixed by Pull Request #3 from @Kappuccino111. Thanks a lot.

lbschenkel commented 1 year ago

What version of CUPS will this be included in, so I can test?

tillkamppeter commented 1 year ago

@lbschenkel The fix is not done in CUPS but in libppd, a part of cups-filters. If you are using a Linux distribution with cups-filters 1.x I could backport the fix to cups-filters.

lbschenkel commented 1 year ago

I use Debian and Arch, so I would appreciate if you could backport this to cups-filters.

tillkamppeter commented 1 year ago

@lbschenkel There is a backport of this fix into cups-filters 1.x now:

https://github.com/OpenPrinting/cups-filters/pull/515

Could you try it out?