Bug 123734 - LibreOffice always uses CUPS default settings instead of what I input settings for printing
Summary: LibreOffice always uses CUPS default settings instead of what I input setting...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords:
Depends on:
Blocks: Printer-Settings
  Show dependency treegraph
 
Reported: 2019-02-27 09:50 UTC by zhangxiufu
Modified: 2019-11-15 07:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
PPD file used (115.72 KB, text/plain)
2019-11-14 16:34 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zhangxiufu 2019-02-27 09:50:19 UTC
Description:
The Password option in the printer's "Properties..." dialogue always gets set back to None, even if I have the custom (such as:1234, 12345678 etc.) inputted.

Other settings (User Code, User ID etc) have the same problem.
All problematic options are settings that allow the user to manually enter.
But when I choose fixed options,it seems work fine.

The printer is a Ricoh SP C840DN (Please download the driver from the following URL: http://www.openprinting.org/ppd-o-matic.php?driver=PDF-Ricoh&printer=Ricoh-SP_C840DN&show=0), used as a network printer. It was installed through CUPS page(localhost:631).

Steps to Reproduce:
1. Install the following Ricoh driver with CUPS(localhost:631), and print to file
http://www.openprinting.org/printer/Ricoh/Ricoh-SP_8400DN
2. Open a document with LibreOffice
3. Click "File -> Print", and open the Printing's dialogue
4. Click "Properties...", and open the printer's properties dialogue
5. Click "Device" tab, then select "Locked Print" in JobType option
6. Click "custom" in Password option, and input "12345678" on Current value textbox
7. Print the document, and check your prn file

Actual Results:
The following command is not output in prn file.
@PJL SET JOBPASSWORD2="12345678"

Expected Results:
The following command is output in prn file.
@PJL SET JOBPASSWORD2="12345678"


Reproducible: Always


User Profile Reset: No



Additional Info:
1. OS Information:
OS:Ubuntu 18.04LTS, OpenSUSE Leap 15.0, CentOS 7.6

2. This issue does not occurs on other apps (gedit, firefox etc).
Comment 1 Xisco Faulí 2019-04-02 10:11:15 UTC
@Caolán, I thought you might be interested in this issue...
Comment 2 Xisco Faulí 2019-10-21 11:49:11 UTC
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 3 Michael Weghorn 2019-11-09 00:51:26 UTC
At a quick glance at /var/log/cups/error_log with a dummy printer set up with the mentioned PPD file that prints to a file:

LO passes this option in 'argv[5]': "Password=12345678"
while when printing with e.g. Firefox, this is: "Password=Custom.12345678"
Comment 4 Michael Weghorn 2019-11-14 16:17:59 UTC
Still reproducible with

Version: 6.4.0.0.alpha1+
Build ID: eeae2032476e8c8645ab438fbb379f3151c8e472
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: kf5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

I'm taking a look.
Comment 5 Michael Weghorn 2019-11-14 16:34:23 UTC
Created attachment 155823 [details]
PPD file used

attaching the PPD file to make sure it remains available, even if the link should stop working at some point in time
Comment 6 Michael Weghorn 2019-11-14 16:54:20 UTC
Pending fix at https://gerrit.libreoffice.org/#/c/82722/ .

Since I don't have the printer in question, I tested by "printing to a file" and checking that the PJL commands are present there as mentioned in the bug description.
Comment 7 Commit Notification 2019-11-15 06:36:22 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3c825bcc483d24bc408f7438d966c79a1f5b084c

tdf#123734 Prepend "Custom." for values of custom PPD options

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-11-15 07:24:52 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/3aafa059aa24d204cc1aa9d920fe6ee5faac9a26

tdf#123734 Prepend "Custom." for values of custom PPD options

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.