Bug 49791 - PRINTING: Documents with image and text, only print the image!
Summary: PRINTING: Documents with image and text, only print the image!
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 05:23 UTC by David Faure
Modified: 2013-06-28 16:45 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Attachments
clear clip-region before end of page (929 bytes, patch)
2012-08-13 14:08 UTC, Michael Meeks
Details
another try at some debugging / fixing (2.98 KB, patch)
2012-08-14 13:41 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2012-05-11 05:23:29 UTC
Problem description: 
When printing a document from Writer, if there is an image in the document ONLY the image prints, but no text.

Steps to reproduce:
1. Open http://hilltop.net/files/sample.odt
2. Print it, on a Brother printer

I'm using a networked Brother MFC-8370DN via CUPS.

Current behavior: Only the image gets printed

Expected behavior: The text should get printed too!

Platform (if different from the browser): It's happening to me on Linux (OpenSUSE 12.1), but apparently it was happening to other people on Windows too, see https://issues.apache.org/ooo/show_bug.cgi?id=112313

This bug report even says that it was fixed in OOo, but I wonder if that fix made it to LO?
              
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.3 Safari/534.34
Comment 1 Michael Meeks 2012-08-13 13:55:02 UTC
According to the OO.o bug the fix was in dev300m102 which was merged to LibreOffice for 3.5 - so if it is fixed there, it should be fixed here.

OTOH - this sounds more like a workaround for a printer problem - I'm not aware of similar reports of missing text and/or images - odd indeed.
Comment 2 Michael Meeks 2012-08-13 14:08:10 UTC
The OO.o fix was windows specific. It is possible that the attached fix does the same thing for all platforms - but needs testing ...
Comment 3 Michael Meeks 2012-08-13 14:08:39 UTC
Created attachment 65499 [details]
clear clip-region before end of page
Comment 4 Michael Meeks 2012-08-13 14:12:15 UTC
patch slightly fluffed should be if (mpGraphics) before we de-reference that pointer.
Comment 5 Michael Meeks 2012-08-14 13:41:05 UTC
Created attachment 65549 [details]
another try at some debugging / fixing

I'm giving up on this; we push/pop the clip region in the PDF stream over the page. The bug is still there for this specific printer when we print to PDF and separately print the PDF from acrobat etc. so - clearly there is -something- wrong in the PDF stream. On the other hand most printers print this, and poplar / acroread can render it just fine too ...

Without more technical details on what is wrong with the printer - it's hard to make progress. To generate those I suggest that you:

* make a minimal document that fails: a tiny (1x1 pixel image), and a single word of text.
* print this to PDF from all available software: MS word, FooOffice, BaaOffice etc. until we find one that works.
* de-compress / analyse the command stream in the one that works, and compare to what we have.

When we have an idea of what is causing the grief, then we can easily fix it I think.

Sorry - I can't do better than that :-)
Comment 6 Michael Meeks 2012-08-14 13:41:18 UTC
as above.
Comment 7 David Faure 2012-08-14 16:37:11 UTC
Thank you for all your help. The patches didn't change anything ;) but the discussion helped. After we determined it was a cups bug (and/or possibly ghostscript), I upgraded cups and ghostscript, and the problem went away.

Broken: cups-1.5.0, ghostscript-9.00
Working: cups-1.5.3, ghostscript-9.05
(I had to upgrade both together, because otherwise I got error about a missing /usr/lib/cups/filter/pstoraster)


So, if anyone hits this bug:
zypper ar -c http://download.opensuse.org/repositories/Printing/openSUSE_12.1 printing
zypper in ghostscript-x11-9.05 ghostscript-9.05 cups-1.5.3 cups-client-1.5.3 cups-devel-1.5.3 cups-libs-1.5.3
sudo rccups restart
Comment 8 David Faure 2013-06-28 16:45:50 UTC
(test document no longer available at original URL -- for future reference, one can use http://www.davidfaure.fr/kde/sample.odt )