Describe the bug
I implemented a simplified backend based on cups-pdf, which only logs all argv[] parameters to a log file. Using this backend, I created a virtual printer with the lpadmin -p -P command. After triggering a print operation with this virtual printer, I observed whether the argv parameters received in the CUPS backend matched the options selected in the UI. I consistently tested with A4, black and white printing, DuplexTumble, and 1200 dpi. I noticed that among different WPS family software, the PDF reader consistently fails to retrieve argv[5] parameters that match the options selected in the UI, while the other doc/ppt/excel software can correctly obtain the matching parameters in the CUPS backend.
Did I make any mistakes while implementing the PPD file?
CUPS backend source code in briefly:
int main(int argc, char* argv[])
{
....
for (int i = 0; i < argc; i++) {
printf("argv[%d] = %s", i, argv[i]);
}
....
}
PPD file : The entries starting with zh_CN. are some Chinese characters.
Describe the bug I implemented a simplified backend based on cups-pdf, which only logs all argv[] parameters to a log file. Using this backend, I created a virtual printer with the
lpadmin -p -P
command. After triggering a print operation with this virtual printer, I observed whether the argv parameters received in the CUPS backend matched the options selected in the UI. I consistently tested with A4, black and white printing, DuplexTumble, and 1200 dpi. I noticed that among different WPS family software, the PDF reader consistently fails to retrieve argv[5] parameters that match the options selected in the UI, while the other doc/ppt/excel software can correctly obtain the matching parameters in the CUPS backend.Did I make any mistakes while implementing the PPD file?
CUPS backend source code in briefly:
PPD file : The entries starting with zh_CN. are some Chinese characters.
To Reproduce Steps to reproduce the behavior:
Expected behavior The parameters seen in the backend for printers created from the same PPD file should remain consistent.
Screenshots I chose A4, black and white printing, DuplexTumble, and 1200 dpi in all test case.
printing a .pdf file===========> which is different from cases below. Maybe it messed up and missed some options such as dpi and ColorModel.
00:51:01 [DEBUG] argv[5] = media=Letter_8_1\2x11_in sides=two-sided-short-edge job-uuid=urn:uuid:468d1029-3100-3c52-6a91-be656cf4d8f8 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1730307061 time-at-processing=1730307061 document-name-supplied=0e2cd672d7a79 Duplex=DuplexTumble PageSize=Letter_8_1\2x11_in
printed a .xlsx file:
00:46:16 [DEBUG] argv[5] = media=Letter_8_1\2x11_in sides=one-sided ColorModel=Black Duplex=DuplexTumble PageRegion=A4_210x297_mm PageSize=A4_210x297_mm Resolution=1200dpi job-uuid=urn:uuid:c88c0a3a-9155-3e0a-7fc4-1fa90b2522af job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1730306776 time-at-processing=1730306776 document-name-supplied=0d0df672bca1f
printed a .docx file
00:48:41 [DEBUG] argv[5] = media=Letter_8_1\2x11_in sides=one-sided ColorModel=Black Duplex=DuplexTumble PageRegion=A4_210x297_mm PageSize=A4_210x297_mm Resolution=1200dpi number-up=1 number-up-layout=lrtb orientation-requested=3 job-uuid=urn:uuid:c6a40c98-5169-3c2b-578e-96bb1a7b3722 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1730306921 time-at-processing=1730306921 document-name-supplied=0edfd672266c1
printed a .pptx file
00:49:51 [DEBUG] argv[5] = media=Letter_8_1\2x11_in sides=one-sided nolandscape ColorModel=Black Duplex=DuplexTumble PageRegion=A4_210x297_mm PageSize=A4_210x297_mm Resolution=1200dpi job-uuid=urn:uuid:524742c6-c5c1-37a4-5297-98aed1385fdb job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1730306991 time-at-processing=1730306991 document-name-supplied=0be2f672b49a9
System Information: