Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

libppd remaps print-color-mode=bi-level, no 1-bit PWG output possible

Đang mở
#91 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
backend

Hướng nghiên cứu

Start in ppd/ppd-cache.c at the linked lines 386–395 and trace how ColorModel=FastGray maps to print-color-mode; compare the 1-bit PWG raster settings in the PPD example with the resulting Ghostscript arguments. Done means print-color-mode=bi-level preserves 1-bit output. The report also links a separate libcupsfilters issue, so check whether that dependency affects this behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug

If the printer reports support for 1-bit bi-level raster (print-color-mode=bi-level, pwg-raster-document-type=black_1), libppd will remap -o print-color-mode=bi-level to =monochrome, because the ippeve generator uses ColorModel=FastGray for 1-bit output, but libppd remaps FastGray to print-color-mode=monochrome instead of =bi-level.

https://github.com/OpenPrinting/libppd/blob/4afdca97f4d416d2a19345bf53b613095a69f679/ppd/ppd-cache.c#L386-L395

To Reproduce

PPD file has:

*cupsFilter2: "image/pwg-raster image/pwg-raster 100 -"
*OpenUI *ColorModel: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*en_US.Translation ColorModel/Color Mode: ""
*ColorModel Gray: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel FastGray: "<</cupsColorSpace 3/cupsBitsPerColor 1/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*en_US.ColorModel Gray/Grayscale: ""
*DefaultColorModel: FastGray
*CloseUI: *ColorModel

I'm printing with: lp -d testp_l -o ColorModel=FastGray -o print-color-mode=bi-level -o page-ranges=1 document-a4.pdf

And the result:

D [22/Oct/2026:16:53:03 +0300] [Job 36] cfFilterGhostscript: Ghostscript command line: gs -dQUIET -dSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dUsePDFX3Profile -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -sMediaClass=PwgRaster -sOutputType=automatic -r300x300 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=18 -dcupsBorderlessScalingFactor=0.0000 -dcupsInteger1=1 -dcupsInteger2=1 -scupsRenderingIntent=auto -scupsPageSizeName=A4 -dcupsManualCopies -I/usr/share/cups/fonts -sOutputICCProfile=sgray.icc -c -f -_

Second bug, in libcupsfilters: https://github.com/OpenPrinting/libcupsfilters/issues/298

Ngôn ngữ chính
C
Star
5
Fork
31
Merge trung bình
6 ngày 10 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenPrinting/libppd

Tất cả issue của OpenPrinting/libppd

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.