Bug 164965 - PDF Export of Writer and Draw documents containing monochrome bitmaps produce black images
Summary: PDF Export of Writer and Draw documents containing monochrome bitmaps produce...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2025-01-31 05:24 UTC by Chris Forbes
Modified: 2025-04-11 02:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Zipfile containing mono bitmap, Writer doc, Draw doc and PDFs (319.29 KB, application/x-zip-compressed)
2025-01-31 05:39 UTC, Chris Forbes
Details
Example files to illustrate how colour depth of bitmaps alters PDF output (1.05 MB, application/x-zip-compressed)
2025-02-03 00:46 UTC, Chris Forbes
Details
Writer doc and PDFs (385.32 KB, application/vnd.oasis.opendocument.text)
2025-04-11 02:13 UTC, Chris Forbes
Details
Writer document and two PDF files produced from it (1.09 MB, application/x-zip-compressed)
2025-04-11 02:18 UTC, Chris Forbes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Forbes 2025-01-31 05:24:50 UTC
Description:
Writer and Draw documents containing monochrome bitmaps (1bpp) work fine in OpenDoc formats, but when exported to PDF the resulting bitmaps are totally black

Steps to Reproduce:
1.Open new Writer or Draw document
2.Insert monochrome bitmap
3.Export to PDF using default settings
4. View resultant PDF file using Adobe Acrobat. Voila!

Actual Results:
The PDFs have black areas corresponding to the bitmaps

Expected Results:
The monochrome bitmaps should have been reproduced in the exported PDF files


Reproducible: Always


User Profile Reset: No

Additional Info:
I am not sure when this bug appeared; I used to produce PDF files this way quite a bit, but somewhere in the last couple of years the problem occurred, and I started using Acrobat directly instead.
I will supply example files illustrating the problem once the bug is accepted.
Comment 1 BogdanB 2025-01-31 05:32:33 UTC
Hi, Chris, can you upload (see Add an attachment button) a simple file with a simple monochrome bitmap, in order to test this bug?
Comment 2 Chris Forbes 2025-01-31 05:39:54 UTC
Created attachment 198898 [details]
Zipfile containing mono bitmap, Writer doc, Draw doc and PDFs
Comment 3 BogdanB 2025-01-31 05:44:35 UTC
I exported your Example.odg and Example.odt to PDF on Linux, and they are like before printing. I will test latter on Windows.

Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 4 Chris Forbes 2025-02-03 00:38:19 UTC
Dear BogdanB (and others)
I have been doing some further testing. I have taken the mono bitmap I used last time, and saved it with a range of different colour depths. I have created a new example Writer file, with five versions of the bitmap on the one page, and then exported to PDF. Only the monochrome image comes out black in the resultant PDF: al the others are fine. The problem only occurs with true monochrome bitmaps. I can send you the files so you can duplicate what I've done.
Cheers,
Chris Forbes
Comment 5 Chris Forbes 2025-02-03 00:46:11 UTC
Created attachment 198931 [details]
Example files to illustrate how colour depth of bitmaps alters PDF output

This zip has a Writer document containing 5 (otherwise identical) embedded bmp files (but of different colour depths), the bitmap files themselves, and the PDF output. Note that only the mono bitmap exports as black: all the others export fine!
Comment 6 meagan.eggert 2025-03-21 18:30:27 UTC
Version 25.2.1.2
Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49
CPU threads: 8; OS: Windows 11 x86_64
UI render: Skia/Raster; VCL: win
Locale: en-US; UI: en-US
Calc: threaded

Unable to reproduce bug, when attempting to save a Writer document with the attached bitmap, the exported PDF looks as expected.
Comment 7 raal 2025-04-10 16:42:29 UTC
No repro with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dcd3427149c33852428b4198c22f6f858125c294
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded


Can you test with newer version?
Comment 8 Chris Forbes 2025-04-11 02:10:45 UTC
Dear Raal (and others),
Attached you will find a Writer document and two PDF files produced from it. 
WriterExample2.pdf was produced using LibreOffice 24.8.3.2 (x86 64) (see document properties). On my (Win 10 64) system the monochrome bitmap displays as black. 
WriterExample3.pdf was produced using LibreOffice 24.8.5.2 (x86 64) (see document properties). On my (Win 10 64) system the monochrome bitmap displays properly: between the two versions the problem appears to have been corrected.

That's the best I can do!

Chris Forbes
Comment 9 Chris Forbes 2025-04-11 02:13:30 UTC
Created attachment 200288 [details]
Writer doc and PDFs
Comment 10 Chris Forbes 2025-04-11 02:14:52 UTC
my mistake: i will put the three files in one zip and upload that.
Comment 11 Chris Forbes 2025-04-11 02:18:28 UTC
Created attachment 200289 [details]
Writer document and two PDF files produced from it