New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom usercode with lpoptions isn't shown in Libreoffice #405
Comments
Hi @TxOfficial , thank you for reporting the issue! Unfortunately it looks you've forgot to attach the .txt file with debug logs - I see only the links to PPD, postscript outputs and screenshots - it would be great if you attached the debug log file as well. Ad the issue - since you change a default value via lpoptions, AFAIU it should be used during normal |
Hi @zdohnal, the "error_log.txt" is still there, between the last two screenshots. I think that the lp commands works but we want to use lpoptions to change the default when we print with the application and not via lp. If we choose one of the predefind values 1001,1002, or 1003 it works also with the application but not with UserCode=Custom.xxxx. Hope you can find and fix the problem? Many thanks and best regards.. |
Aha, completely missed it - I was looking among the other .txt files, but didn't look between the screenshots...
I've asked about So it would be great if you tried to print via lp without -o option - if lp correctly loads |
Hi @zdohnal, yes it works when i use lp without the -o option. Any idea how to fix this with the CUPS API that libre use? |
Ok, I've checked the code which LibreOffice uses and compared with From cups.dest.c:
So I cannot fix this in CUPS - the proper fix has to happen in LibreOffice, so the app can use the correct function and get users the correct options. It would be great if you reported this issue to Libreoffice project. Thank you in advance! Zdenek |
@zdohnal |
@michaelrsweet ok, then I will reinvestigate - thanks for checking! |
Ok, I was able to reproduce this with CUPS 2.4.2 and Libreoffice 7.3.3.2. I set Custom.0850 via lpoptions and lp command is able to apply the option into job, but Libreoffice doesn't. Then I wrote a simple program with
CUPS correctly passes the user defined value for UserCode via |
Today i check the behaviour on the new Ubuntu 22.04 with CUPS 2.4.1 and the following PPD:
https://www.openprinting.org/download/PPD/Ricoh/PS/Ricoh-IM_C3000_PS.ppd
When I use the print dialog from libre office and setup the usercode manually within the appplication printdialog, I got the attached PS-file "01_Print_via_libre_print_dialog_usercode_0850.ps.txt" within the UserCode 0850. Then I closed libre office, used lpoptions on the command line (refer screenshot 05_lpoptions_command.png), started libre again and print without any changes in the printdialog of libre I got "02_Print_via_libre_lpoption.ps.txt" with an empty UserCode. At this time lpoption -l and cat ~/.cups/lpoption has the values from the attached Screenshot "03_Values of lpoption.png". See the asterisk (*) in the usercode line at "Custom.STRING". When I open the printdialog in libre and check the usercode option the option was also set to custom but with an empty value (not "0850") and the printresult is wrong as "02_...ps.txt". I've checked the cups error_log, but can't find any entry for UserCode "0850" at this time and also the processing of the lpoptions command after I setup "cupsctl --debug-logging" takes a really long time, approx. 20sec after the cursor/promt comes back. Interesting is, when i use the lp-command "lp -d print2welp -o UserCode=Custom.0850 test.pdf" it works and I get a correct file similar to "01_....ps.txt". So i think there is a bug within the lpoptions command
Hope you can find anything that can help us in the attached cups error_log. Until approx. 1,1MB you find the first bad printout (lpoption) without success and after that the second one with the successful lp command.
01_Print_via_libre_print_dialog_usercode_0850.ps.txt
02_Print_via_libre_lpoption.ps.txt
error_log.txt
The text was updated successfully, but these errors were encountered: