Bug 145616 - PRINTING: unable to print or generate PostScript from Writer Document with embedded grayscale images
Summary: PRINTING: unable to print or generate PostScript from Writer Document with em...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-10 16:13 UTC by wischnew
Modified: 2023-01-26 18:40 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Writer Document with embedded images (25.36 KB, application/vnd.oasis.opendocument.text)
2021-11-10 16:16 UTC, wischnew
Details
PostScript file generated by LibO (81.07 KB, application/postscript)
2021-11-10 16:17 UTC, wischnew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wischnew 2021-11-10 16:13:03 UTC
Description:
It seems as if the wrong color space is being used for generation of the Post  Script code for grayscale images. Trying to view it with GhostView leads to an error. Also trying to print the document directly from LibO does not result on any output on the printer.

Steps to Reproduce:
1. Create a new LibreOffice Writer Document
2. Insert > Image... > Select an image that is saved in grayscale
3. File > Print... > select Printer: Print to File...
4. Click on Properties... > Device > select Printer language type: PostScript

Actual Results:
PostScript file contains 'DeviceRGB' for that image

Expected Results:
should be a 'DeviceGray' instead


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 96; OS: Linux 4.14; UI render: default; VCL: x11
Locale: en-US (C); UI: en-US
Debian package version: 1:7.2.2-1
Calc: threaded
Comment 1 wischnew 2021-11-10 16:16:21 UTC
Created attachment 176179 [details]
Writer Document with embedded images

Simple LibO Document with two images embedded, one in RGB and one in Grayscale
Comment 2 wischnew 2021-11-10 16:17:38 UTC
Created attachment 176180 [details]
PostScript file generated by LibO
Comment 3 Dieter 2021-11-25 16:11:34 UTC
(In reply to wischnew from comment #0)
> 4. Click on Properties... > Device > select Printer language type: PostScript

I'm sorry, but I can't find that setting. "Properties" shows proberties of my default printer
Comment 4 wischnew 2021-11-26 09:22:20 UTC
(In reply to Dieter from comment #3)
> I'm sorry, but I can't find that setting. "Properties" shows proberties of
> my default printer

In this new window for the printer properties you have a tab "Device" where you can set "Printer language type" to the value "PostScript".

Basically if you select "print to file" as printer and PostScript as file type, then the output file cannot be displayed correctly with a PostScript viewer.

There is also no output on a PostScript printer for Writer Documents containing grayscale images. 

This behavior can also be achieved for any document containing any images by setting following options:

1. click on "Tools" > "Options..."
2. select "LibreOffice" > "Print"
3. on the right side set "Convert colors to grayscale"
Comment 5 Buovjaga 2022-11-22 11:31:40 UTC
I didn't test by printing to a physical device, but I confirm the result is like you describe when printing to a .ps file. Already in oldest of 43all bibisect repository.

If I remove the RGB image, then the code is different:
[/Indexed /DeviceRGB 255

I don't know what package you mean by GhostView, so couldn't check it.

Arch Linux 64-bit
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 70987cc656f0cded915be5aa148f265a257ec791
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 22 November 2022
Comment 6 ⁨خالد حسني⁩ 2023-01-26 18:40:45 UTC
We are deprecating and eventually removing PostScript printing. If one really needs a PostScript file, it can be converted to from PDF using external tools.